Compare commits

...

237 Commits

Author SHA1 Message Date
hang 06ac8f114a 修改质控显示名字
continuous-integration/drone/push Build encountered an error
2024-12-11 13:57:24 +08:00
he 78bc09d71a Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build encountered an error
2024-12-11 13:46:19 +08:00
he d2bca834ed 导出修改 2024-12-11 13:46:17 +08:00
hang 34c50858c9 关闭邮件
continuous-integration/drone/push Build is passing
2024-12-11 13:37:09 +08:00
hang a7441c8c78 修改导表报错
continuous-integration/drone/push Build encountered an error
2024-12-11 13:26:59 +08:00
hang 125846e6b2 修改导表bug
continuous-integration/drone/push Build encountered an error
2024-12-11 13:00:03 +08:00
hang d35b9a6f6f Merge branch 'Test_IRC_Net8' into Uat_IRC_Net8
continuous-integration/drone/push Build encountered an error
2024-12-11 12:19:26 +08:00
hang 6b592cbda7 针对时区转换修改
continuous-integration/drone/push Build is passing
2024-12-11 10:44:33 +08:00
hang f8e498b2e1 修改导表和时间处理
continuous-integration/drone/push Build is passing
2024-12-11 10:27:24 +08:00
hang 8ff23af18c 增加条件
continuous-integration/drone/push Build is passing
2024-12-11 09:44:13 +08:00
hang 828bd38eab 整理废弃
continuous-integration/drone/push Build is passing
2024-12-11 08:57:39 +08:00
hang a9f22897e9 修改统计完成
continuous-integration/drone/push Build is passing
2024-12-11 00:42:43 +08:00
hang b14f3fb251 修改统计 分步查询
continuous-integration/drone/push Build is passing
2024-12-11 00:01:58 +08:00
hang 91cde3f944 修改导出测试
continuous-integration/drone/push Build is passing
2024-12-10 21:30:36 +08:00
hang fcffa32e06 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-12-10 20:07:43 +08:00
hang e2e03e30ef 临时提交 2024-12-10 20:07:42 +08:00
he bdb12a7df3 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-12-10 19:57:13 +08:00
he e456f8684c 导出修改 2024-12-10 19:57:12 +08:00
hang 81b56c03b7 修改阅片期导表
continuous-integration/drone/push Build is passing
2024-12-10 18:16:50 +08:00
hang a92fa86809 修改导表阅片人
continuous-integration/drone/push Build is passing
2024-12-10 18:00:49 +08:00
hang 745ab5cb25 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-12-10 17:48:28 +08:00
hang 8cee47a9f7 修改统计 2024-12-10 17:48:27 +08:00
he b174a72709 修改 计算 给默认值
continuous-integration/drone/push Build is passing
2024-12-10 17:32:59 +08:00
he aebc9446ba Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-12-10 17:29:34 +08:00
he 6e7b77af00 修改 添加默认值 2024-12-10 17:29:32 +08:00
hang e147c2a370 修改导出 患者裁判率
continuous-integration/drone/push Build is passing
2024-12-10 17:07:23 +08:00
hang 30f41ba270 修改测试demo
continuous-integration/drone/push Build is passing
2024-12-10 16:34:04 +08:00
hang 468a124841 修改裁判访视数量
continuous-integration/drone/push Build is passing
2024-12-10 16:16:51 +08:00
hang 33a15676b5 受试者维度统计遗留 先提交
continuous-integration/drone/push Build is passing
2024-12-10 16:03:43 +08:00
hang a8b614e2a5 修改临时提交
continuous-integration/drone/push Build is passing
2024-12-10 15:00:53 +08:00
hang 57d9a8665d 临时修改提交
continuous-integration/drone/push Build is passing
2024-12-10 14:32:40 +08:00
hang 2d03635ec4 优化搜索条件
continuous-integration/drone/push Build is passing
2024-12-10 14:11:46 +08:00
hang 5e34a41902 修改无全局bug
continuous-integration/drone/push Build is passing
2024-12-10 14:08:45 +08:00
hang 6b02c03f7f 阅片期维度统一 裁判 和一致率
continuous-integration/drone/push Build is passing
2024-12-10 13:54:33 +08:00
hang 1c0547f3ff 有阅片期无全局
continuous-integration/drone/push Build is passing
2024-12-10 13:30:07 +08:00
hang 4b3e1ba5c0 裁判一致率修改
continuous-integration/drone/push Build is passing
2024-12-10 10:48:12 +08:00
hang eb77fcfa2f 修改裁判标记设置方法
continuous-integration/drone/push Build is passing
2024-12-10 10:18:25 +08:00
hang 86692d220a 裁判一致率
continuous-integration/drone/push Build is passing
2024-12-09 15:15:19 +08:00
hang 1417277cb1 修改阅片期裁判 遗漏情况
continuous-integration/drone/push Build is passing
2024-12-09 11:36:50 +08:00
hang f40a48265c Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-12-06 13:35:47 +08:00
hang 04e4b0ac34 修改导出判断逻辑 2024-12-06 13:35:45 +08:00
he 6526e03d2c Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-12-06 11:34:12 +08:00
he 1fb09d05a3 修改 2024-12-06 11:34:11 +08:00
hang 6eefbb1745 修改配置
continuous-integration/drone/push Build is passing
2024-12-05 17:03:44 +08:00
hang effd6fee41 修改质控返回字段
continuous-integration/drone/push Build is passing
2024-12-05 16:45:33 +08:00
hang 84ba0bc4a9 修改非dicom 排序
continuous-integration/drone/push Build is passing
2024-12-05 16:11:27 +08:00
hang 7cf9bd4a81 修改判断
continuous-integration/drone/push Build is passing
2024-12-05 10:38:21 +08:00
hang ba8a457688 修改裁判设置标志
continuous-integration/drone/push Build is passing
2024-12-05 09:08:53 +08:00
hang 848e33edb8 修改没有产生裁判,裁判触发标志 和裁判选择标记
continuous-integration/drone/push Build is passing
2024-12-04 20:05:13 +08:00
hang 47eaed78ed 修改导表
continuous-integration/drone/push Build is passing
2024-12-04 17:45:06 +08:00
hang 137f77cdc5 修改阅片期导表
continuous-integration/drone/push Build is passing
2024-12-04 15:33:40 +08:00
hang a2cfec6553 修改导表排序+ 受试者无阅片期 字段设置问题
continuous-integration/drone/push Build is passing
2024-12-04 11:37:57 +08:00
he da2209cf95 修改
continuous-integration/drone/push Build is passing
2024-12-03 17:37:01 +08:00
he ce8611e138 修改
continuous-integration/drone/push Build is passing
2024-12-02 17:32:15 +08:00
he 948c0d32ab 修改状态
continuous-integration/drone/push Build is passing
2024-12-02 17:16:43 +08:00
he c2ed06061a 修改查询临床数据状态
continuous-integration/drone/push Build is passing
2024-12-02 17:04:16 +08:00
he b610143e33 修改
continuous-integration/drone/push Build is passing
2024-12-02 17:00:00 +08:00
he fa0e4f7326 修改
continuous-integration/drone/push Build is passing
2024-12-02 16:55:58 +08:00
he 393bce5f5c 验证是否有重复的概况
continuous-integration/drone/push Build is passing
2024-12-02 16:51:05 +08:00
he 004f73b24d 修改临床数据
continuous-integration/drone/push Build is passing
2024-12-02 16:21:09 +08:00
he e53b56f0d4 先删除
continuous-integration/drone/push Build is passing
2024-12-02 15:21:56 +08:00
he 7dbf99e1c8 修改适应症
continuous-integration/drone/push Build is passing
2024-12-02 15:16:04 +08:00
he 2f77c0ecef 代码修改
continuous-integration/drone/push Build is passing
2024-12-02 15:01:17 +08:00
he 2ce0306311 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-12-02 14:19:05 +08:00
he 79ff873607 修改 2024-12-02 14:19:02 +08:00
hang 9827ffa0f2 HIR 临时web
continuous-integration/drone/push Build is passing
2024-12-02 13:24:02 +08:00
hang f81cf9c2f2 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-28 16:18:47 +08:00
hang 456e6f3035 IRC-HIR 授权码增加接口 2024-11-28 16:18:45 +08:00
he 25c3a6518d 修改
continuous-integration/drone/push Build is passing
2024-11-28 14:04:05 +08:00
he 53a33c956f Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-28 11:42:00 +08:00
he c9daa09a0b 修改 2024-11-28 11:41:59 +08:00
hang 156db9f6c5 更新账户
continuous-integration/drone/push Build is passing
2024-11-27 17:39:45 +08:00
hang 1b9eeba5ba 调研表更新逻辑优化
continuous-integration/drone/push Build is passing
2024-11-27 17:10:23 +08:00
hang a1588273e8 导表阅片期裁判备注
continuous-integration/drone/push Build is passing
2024-11-27 15:59:22 +08:00
hang 38b661da01 修改定时任务 移除定时任务
continuous-integration/drone/push Build is passing
2024-11-27 15:01:27 +08:00
hang 017babde86 修改定时任务
continuous-integration/drone/push Build is passing
2024-11-27 14:53:35 +08:00
hang 74da92bc72 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-26 16:46:54 +08:00
hang 281b5d2177 修改导表 2024-11-26 16:46:53 +08:00
he a9a435ee0f Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-26 16:22:01 +08:00
he 6f784a1054 修改 2024-11-26 16:22:00 +08:00
hang 90412c5817 修改导表翻译字典
continuous-integration/drone/push Build is passing
2024-11-26 16:09:14 +08:00
hang ecb0ab07d2 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-26 16:02:32 +08:00
hang 522e056f3c 导表字段增加查询 2024-11-26 16:02:31 +08:00
he 92ca6a9a34 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-26 15:29:52 +08:00
he 93f660a2ca 修改 2024-11-26 15:29:52 +08:00
hang 7997e8c408 修改挤账号生成token bug
continuous-integration/drone/push Build is passing
2024-11-26 15:03:24 +08:00
he eb363fd564 修改
continuous-integration/drone/push Build is passing
2024-11-26 10:49:39 +08:00
he 04e4e786b0 修改
continuous-integration/drone/push Build is passing
2024-11-26 10:23:06 +08:00
he 12449325a9 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-25 17:50:05 +08:00
he 3b48685a07 修改符号 2024-11-25 17:50:04 +08:00
hang 1adb7e6e2a Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is running
2024-11-25 17:48:18 +08:00
hang 46e1da667a 导表增加验证 2024-11-25 17:48:16 +08:00
he c5aaa08326 修改
continuous-integration/drone/push Build is passing
2024-11-25 16:53:07 +08:00
he e7193be3d7 修改长度
continuous-integration/drone/push Build is passing
2024-11-25 16:37:34 +08:00
he 56f27189f1 修改
continuous-integration/drone/push Build is passing
2024-11-25 16:31:15 +08:00
he 69bfecca9c 修改
continuous-integration/drone/push Build is running
2024-11-25 16:30:56 +08:00
he bc68271a2a 修改
continuous-integration/drone/push Build is passing
2024-11-25 16:15:16 +08:00
he 27314a139d 问题修改
continuous-integration/drone/push Build is passing
2024-11-25 16:11:06 +08:00
he 8ebaface32 修改
continuous-integration/drone/push Build is passing
2024-11-25 15:28:12 +08:00
he 408e03d02f 修改
continuous-integration/drone/push Build is passing
2024-11-25 15:24:33 +08:00
he 8415d848c7 修改
continuous-integration/drone/push Build is passing
2024-11-25 15:15:19 +08:00
he 6ded64d830 复制标准信息
continuous-integration/drone/push Build is running
2024-11-25 15:14:50 +08:00
he 00f6e3dc29 获取访视临床数据
continuous-integration/drone/push Build is passing
2024-11-25 14:52:55 +08:00
he 7fad0345cf 简历默认值
continuous-integration/drone/push Build is passing
2024-11-25 11:48:25 +08:00
he 4fa9dafdd8 修改
continuous-integration/drone/push Build is passing
2024-11-25 11:26:35 +08:00
he 819dfe9b68 修改
continuous-integration/drone/push Build is passing
2024-11-25 11:21:14 +08:00
he d0828ddf0e 修改长度
continuous-integration/drone/push Build is passing
2024-11-22 17:59:47 +08:00
he c7d9e02b8d 修改IVUS导入的计算
continuous-integration/drone/push Build is passing
2024-11-22 11:33:18 +08:00
he 1bec318440 修改
continuous-integration/drone/push Build is passing
2024-11-22 10:34:40 +08:00
he cd6c57cec8 修改
continuous-integration/drone/push Build is running
2024-11-22 10:33:40 +08:00
he f3942b507c 修改
continuous-integration/drone/push Build is passing
2024-11-22 09:54:03 +08:00
he 888be6430a 简历修改
continuous-integration/drone/push Build is passing
2024-11-21 16:34:09 +08:00
he c5e5ac4e45 修改
continuous-integration/drone/push Build is passing
2024-11-21 15:25:57 +08:00
he ece6832bb8 修改
continuous-integration/drone/push Build is passing
2024-11-21 15:16:54 +08:00
he 6c434e2ace 修改
continuous-integration/drone/push Build is passing
2024-11-21 13:32:14 +08:00
he c08bad2fec 修改
continuous-integration/drone/push Build is passing
2024-11-21 11:34:41 +08:00
he 5cafbdeaca 修改
continuous-integration/drone/push Build is passing
2024-11-21 11:30:53 +08:00
he 70b99d56a4 修改
continuous-integration/drone/push Build is passing
2024-11-20 16:13:44 +08:00
he 66f91986bc Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-20 16:10:37 +08:00
he 8eff23a8f2 代码修改 2024-11-20 16:10:35 +08:00
hang 9bd0a23734 迁移修改uat环境配置文件
continuous-integration/drone/push Build is passing
2024-11-20 14:22:03 +08:00
hang e3622cb86f 修改导出标志2
continuous-integration/drone/push Build is passing
2024-11-19 15:46:43 +08:00
hang eaf3d5e3e8 修改导表设置的标志
continuous-integration/drone/push Build is passing
2024-11-19 15:13:08 +08:00
hang d7bce4802a 修改导表裁判选择标志
continuous-integration/drone/push Build is passing
2024-11-19 10:31:18 +08:00
hang 99c594acac Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-18 17:30:46 +08:00
hang 5844b28983 修改导表标志1 2024-11-18 17:30:45 +08:00
he 26c2e917d9 修改
continuous-integration/drone/push Build is passing
2024-11-18 17:18:52 +08:00
he 07a2f19cf5 修改
continuous-integration/drone/push Build is passing
2024-11-18 17:03:30 +08:00
he 085213f920 修改
continuous-integration/drone/push Build is passing
2024-11-18 15:57:44 +08:00
he 985250e25c 修改
continuous-integration/drone/push Build is running
2024-11-18 15:55:57 +08:00
he 1c6acff8d7 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-18 13:30:12 +08:00
he dd77dc43b6 修改 2024-11-18 13:30:11 +08:00
hang c7b86954fa 修改邮件发送延迟
continuous-integration/drone/push Build is passing
2024-11-15 17:39:13 +08:00
hang 13c55be759 修改查询配置 邮件发送延迟
continuous-integration/drone/push Build is passing
2024-11-15 17:26:41 +08:00
he ce8e842823 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-15 16:02:06 +08:00
he e5508e9b0c 修改 2024-11-15 16:02:05 +08:00
hang 67e526893c 修改调研表title
continuous-integration/drone/push Build is passing
2024-11-15 15:42:54 +08:00
hang efcb3cf168 修改国际化bug
continuous-integration/drone/push Build is passing
2024-11-14 15:16:28 +08:00
hang ed8f24a3ad 修改系统邮件配置
continuous-integration/drone/push Build is passing
2024-11-14 13:27:09 +08:00
hang 98947b0609 导表修改
continuous-integration/drone/push Build is passing
2024-11-13 16:27:41 +08:00
he 09d7a34c97 验证访视提交
continuous-integration/drone/push Build is passing
2024-11-12 17:19:44 +08:00
he 50667bddfb 修改
continuous-integration/drone/push Build is passing
2024-11-12 14:43:18 +08:00
he 655ef79754 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-12 14:09:27 +08:00
he 9d3e1edd61 修改 2024-11-12 14:09:26 +08:00
hang aba0101b01 导出表里的日期 把时间去掉
continuous-integration/drone/push Build is passing
2024-11-12 14:05:34 +08:00
hang 7ca007b6fa 移除废除代码
continuous-integration/drone/push Build is passing
2024-11-12 13:47:50 +08:00
hang 3603656a1c 全局过滤修改
continuous-integration/drone/push Build is passing
2024-11-11 18:09:18 +08:00
hang c372498251 病灶导表修改
continuous-integration/drone/push Build is passing
2024-11-11 16:53:24 +08:00
hang 05b5d0d264 OCT 斑块导出
continuous-integration/drone/push Build is passing
2024-11-11 14:51:29 +08:00
hang 45ab896bb9 修改导表日期
continuous-integration/drone/push Build is passing
2024-11-11 12:25:35 +08:00
hang 2326d26c0b Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is running
2024-11-11 12:23:59 +08:00
hang 28587c8e91 修改导表日期处理 2024-11-11 12:23:58 +08:00
he 78c707a018 修改
continuous-integration/drone/push Build is passing
2024-11-11 11:34:42 +08:00
he 5e889b1529 修改
continuous-integration/drone/push Build is passing
2024-11-11 11:01:26 +08:00
he ec945b4b39 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-11 10:37:51 +08:00
he 4f72d97039 修改 2024-11-11 10:37:49 +08:00
hang 4d4af84716 hangfire 测试提交
continuous-integration/drone/push Build is passing
2024-11-11 09:26:15 +08:00
hang 47be1e52c9 项目术语配置,导表统一处理
continuous-integration/drone/push Build is passing
2024-11-09 17:05:34 +08:00
hang 4145421087 修改json 列
continuous-integration/drone/push Build is passing
2024-11-08 17:26:46 +08:00
hang f83bd75853 x
continuous-integration/drone/push Build is passing
2024-11-08 17:16:30 +08:00
hang 7e53c24919 修改冲突
continuous-integration/drone/push Build is running
2024-11-08 17:16:20 +08:00
hang 341e4321b2 json 列修改提交 2024-11-08 17:14:41 +08:00
hang c90258c49e 修改创建项目临时解决
continuous-integration/drone/push Build is passing
2024-11-08 16:56:41 +08:00
hang 5fdbdfec82 json 列更新需要手动设置
continuous-integration/drone/push Build is passing
2024-11-08 14:28:53 +08:00
hang 41a889f201 项目配置使用Json 列 测试
continuous-integration/drone/push Build is passing
2024-11-08 13:49:49 +08:00
hang 1f33a9fa4e efcore 8 json 列测试完毕
continuous-integration/drone/push Build is passing
2024-11-08 13:41:07 +08:00
hang 760321f8fa 修改模板
continuous-integration/drone/push Build is passing
2024-11-07 18:09:38 +08:00
hang aae8afd0c5 添加默认值
continuous-integration/drone/push Build is passing
2024-11-07 15:32:58 +08:00
hang 33bf0d908d 一致性分析过滤掉全局任务
continuous-integration/drone/push Build is passing
2024-11-07 14:35:19 +08:00
hang 4f67de2898 仅仅保留一致性分析有的任务的原始任务
continuous-integration/drone/push Build is passing
2024-11-07 14:18:44 +08:00
hang 79949b9bad 修改一致性分析导表arm 错误
continuous-integration/drone/push Build is passing
2024-11-07 14:08:55 +08:00
hang 1648cbef7b Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-07 11:03:56 +08:00
hang 4abd7c8fe2 修改一致性分析导表 2024-11-07 11:03:54 +08:00
he bdf14d8641 修改
continuous-integration/drone/push Build is passing
2024-11-07 10:48:59 +08:00
he d2530de925 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-07 10:45:32 +08:00
he f1a6ca24be 修改 2024-11-07 10:45:32 +08:00
hang 8d1a6c8cec Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-07 10:37:07 +08:00
hang 656b1cf252 项目顶级术语修改 2024-11-07 10:37:06 +08:00
he b89cfeb90c 修改
continuous-integration/drone/push Build is passing
2024-11-07 10:19:25 +08:00
he 5b3beea8fa Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-07 10:01:50 +08:00
he b7d3a365b4 修改 2024-11-07 10:01:49 +08:00
hang bf0ab3411d 用户添加触发器使用
continuous-integration/drone/push Build is passing
2024-11-07 08:52:12 +08:00
hang c5dacab771 修改导表标题少括号
continuous-integration/drone/push Build is passing
2024-11-06 17:12:27 +08:00
hang db363a7daa 修改组间一致性分析导表
continuous-integration/drone/push Build is passing
2024-11-06 16:56:12 +08:00
hang 4c41a5a579 导表筛选标准
continuous-integration/drone/push Build is passing
2024-11-06 15:29:50 +08:00
hang c48803ca0c 账户稽查修改
continuous-integration/drone/push Build is passing
2024-11-06 15:15:32 +08:00
hang b5e26da1ff Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-06 14:28:58 +08:00
hang 501272a2a2 修改批量添加 2024-11-06 14:28:57 +08:00
he e66475ab61 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-06 14:13:08 +08:00
he 6a54a36719 修改 2024-11-06 14:13:07 +08:00
hang b2851352f2 修改一致性分析导表
continuous-integration/drone/push Build is passing
2024-11-06 14:10:49 +08:00
hang 756838e106 Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-06 13:51:06 +08:00
hang b83ea13aed 修改邮件配置 2024-11-06 13:51:05 +08:00
Hewt 5202ee7bd6 修改
continuous-integration/drone/push Build is passing
2024-11-05 14:12:46 +08:00
Hewt 424a05c211 简历信息修改 2024-11-05 13:07:24 +08:00
Hewt 702e20c834 测试推送
continuous-integration/drone/push Build is passing
2024-11-04 18:45:04 +08:00
hang 506955ca7c Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-04 18:02:28 +08:00
hang 9cbd1faf93 测试 2024-11-04 18:02:27 +08:00
he 3354aa37f4 修改
continuous-integration/drone/push Build is passing
2024-11-04 17:51:53 +08:00
he f17001bace Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-04 17:41:34 +08:00
he 80d99d4862 修改 2024-11-04 17:41:33 +08:00
hang d19b5da008 Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-04 17:22:16 +08:00
hang 31fdedb033 增加邮件查询条件 2024-11-04 17:22:15 +08:00
he c87e268165 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-04 16:40:16 +08:00
he 93726ae28c 修改 2024-11-04 16:40:15 +08:00
hang fed21316df Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-04 16:31:47 +08:00
hang 205619071d 重置密码,清理密码错误限制 2024-11-04 16:31:47 +08:00
he 16e985b37e Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-04 15:04:33 +08:00
he 590a7e7b05 修改 2024-11-04 15:04:32 +08:00
hang 239f87320b 修改导表枚举翻译
continuous-integration/drone/push Build is passing
2024-11-04 13:35:20 +08:00
hang d03c00d138 修改导表枚举
continuous-integration/drone/push Build is passing
2024-11-04 13:27:56 +08:00
hang 9778f5e943 修改统计报错
continuous-integration/drone/push Build is passing
2024-11-04 13:14:32 +08:00
hang 3752bc0311 修改邮件查询列表
continuous-integration/drone/push Build is passing
2024-11-04 11:36:07 +08:00
hang 76bdbcbfcb Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-04 10:48:13 +08:00
hang 70d321f778 系统邮件修改 2024-11-04 10:48:11 +08:00
he e666d93829 Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-04 10:41:01 +08:00
he a6a8f34734 修改 2024-11-04 10:41:00 +08:00
hang 317184ba7a 修改后处理上传
continuous-integration/drone/push Build is passing
2024-11-04 10:14:14 +08:00
hang 68052766f8 logto 授权码模式测试
continuous-integration/drone/push Build is passing
2024-11-03 12:59:49 +08:00
hang dc1cea6b5a 修改加急发送邮件
continuous-integration/drone/push Build is passing
2024-11-01 14:18:16 +08:00
hang ebe597a575 修改加急阅片10分钟
continuous-integration/drone/push Build is passing
2024-11-01 11:09:23 +08:00
hang 4b4688538d 修改重复邮件问题
continuous-integration/drone/push Build is passing
2024-11-01 10:59:32 +08:00
hang 0111136c95 Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-01 10:47:17 +08:00
hang 8a0f1d0759 修改一致性分析导表 2024-11-01 10:47:15 +08:00
he 44c1ad740c Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-11-01 10:42:58 +08:00
he 664942a235 修改 2024-11-01 10:42:56 +08:00
hang 99e7079c14 Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-10-31 18:05:11 +08:00
hang ec8e553304 增加 IdentityModel.OidcClient 测试ok 2024-10-31 18:05:10 +08:00
he 93ed4013fe 修改
continuous-integration/drone/push Build is passing
2024-10-31 17:59:46 +08:00
he 531e2f4a08 修改
continuous-integration/drone/push Build is passing
2024-10-31 17:57:30 +08:00
he 06059f15ac 修改
continuous-integration/drone/push Build is passing
2024-10-31 16:22:52 +08:00
he 23e6811e89 修噶
continuous-integration/drone/push Build is running
2024-10-31 16:22:26 +08:00
hang 6a1a7ba452 Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
2024-10-31 15:54:56 +08:00
hang a9c9486162 增加QC 添加质疑触发逻辑 2024-10-31 15:54:54 +08:00
he 3d6cfccbdf 修改
continuous-integration/drone/push Build is passing
2024-10-31 15:16:18 +08:00
he 007f8eddc9 修改密码验证
continuous-integration/drone/push Build is passing
2024-10-09 15:11:50 +08:00
he b94bc8eff1 验证密码
continuous-integration/drone/push Build is failing
2024-10-09 15:01:37 +08:00
134 changed files with 221913 additions and 1484 deletions
+7 -7
View File
@@ -12,18 +12,18 @@
"RegionId": "cn-shanghai",
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
"AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm",
"AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV",
"RoleArn": "acs:ram::1899121822495495:role/dev-oss-access",
"BucketName": "zy-irc-uat-store",
"ViewEndpoint": "https://zy-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
"AccessKeyId": "LTAI5tFUCCmz5TwghZHsj45Y",
"AccessKeySecret": "8evrBy1fVfzJG25i67Jm0xqn9Xcw2T",
"RoleArn": "acs:ram::1078130221702011:role/uat-oss-access",
"BucketName": "tl-med-irc-uat-store",
"ViewEndpoint": "https://tl-med-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
"Region": "oss-cn-shanghai",
"DurationSeconds": 7200
}
},
"ConnectionStrings": {
"RemoteNew": "Server=47.117.164.182,1434;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
"Hangfire": "Server=47.117.164.182,1434;Database=Uat_IRC.Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
"RemoteNew": "Server=101.132.253.119,1435;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
"Hangfire": "Server101.132.253.119,1435;Database=Uat_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
},
"DicomSCPServiceConfig": {
"CalledAEList": [
+5 -59
View File
@@ -1,9 +1,10 @@
using Amazon.Auth.AccessControlPolicy;
using Amazon.SecurityToken;
using Azure.Core;
using IdentityModel.Client;
using IdentityModel.OidcClient;
using IRaCIS.Application.Contracts;
using IRaCIS.Application.Interfaces;
using IRaCIS.Core.API.OAuth;
using IRaCIS.Core.Application.Auth;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Helper;
@@ -25,7 +26,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using ZiggyCreatures.Caching.Fusion;
using AssumeRoleRequest = Amazon.SecurityToken.Model.AssumeRoleRequest;
@@ -308,7 +311,7 @@ namespace IRaCIS.Api.Controllers
{
var token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()
{
Id = Guid.Empty,
Id = Guid.NewGuid(),
IsReviewer = false,
IsAdmin = false,
RealName = "Share001",
@@ -433,63 +436,6 @@ namespace IRaCIS.Api.Controllers
#endregion
#region logto
var baseUrl = "https://logto.test.extimaging.com";
var appId = "v2mr2ndxwkxz0xpsuc1th";
var appSecret = "yq9jUxl70QoOmwHxJ37h1rDoyJ5iz92Q";
var apiAddress = "https://default.logto.app/api"; //这里是个坑
var scope = "all";
var opts = new RestClientOptions(baseUrl);
using var client = new RestClient(opts);
//https://bump.sh/logto/doc/logto-management-api/authentication
var request = new RestRequest("oidc/token", Method.Post);
request
.AddHeader("Content-Type", "application/x-www-form-urlencoded")
.AddParameter("grant_type", "client_credentials")
.AddParameter("client_id", appId)
.AddParameter("client_secret", appSecret)
.AddParameter("resource", apiAddress) //注意这里默认值地址和api 地址有区别
.AddParameter("scope", scope);
var response = await client.ExecuteAsync<LogtoTokenResponse>(request);
if (response.StatusCode == HttpStatusCode.OK)
{
var tokenResponse = response.Data;
Console.WriteLine(tokenResponse.ToJsonStr());
#region
var applicationRequest = new RestRequest($"/api/applications", Method.Get)
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
var applicationResponse = await client.ExecuteAsync(applicationRequest);
#endregion
#region
//curl \
// -X GET https://[tenant_id].logto.app/api/users/{userId} \
// -H "Authorization: Bearer $ACCESS_TOKEN"
var userId = "4fqx4cb3438k";
var userInfoRequest = new RestRequest($"api/users/{userId}", Method.Get)
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
var userResponse = await client.ExecuteAsync<LogtoUser>(userInfoRequest);
Console.WriteLine(userResponse.Content);
#endregion
}
#endregion
return ResponseOutput.Ok();
-141
View File
@@ -346,147 +346,6 @@
</summary>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.API.OAuth.LogtoParameters.Tokens">
<summary>
The token names used by Cookie and OpenID Connect middleware to store and retrieve tokens from
Logto OpenID Connect provider.
<br/>
See <see href="https://github.com/dotnet/aspnetcore/blob/4a9118c674a798aaf6379b4b7b2d8787bc688f96/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectHandler.cs#L994-L1035">tokens that are stored by OpenID Connect middleware</see> for more details.
</summary>
</member>
<member name="T:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes">
<summary>
The scope names used by Logto OpenID Connect provider to request for user information.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes.Email">
<summary>
The scope name for requesting user's email.
Logto will issue two claims to the ID token: <c>email</c> and <c>email_verified</c>.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes.Phone">
<summary>
The scope name for requesting user's phone number.
Logto will issue two claims to the ID token: <c>phone</c> and <c>phone_verified</c>.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes.CustomData">
<summary>
The scope name for requesting user's custom data.
Logto will issue a claim to the response of the <c>userinfo</c> endpoint: <c>custom_data</c>.
<br/>
Note that when requesting this scope, you must set <see cref="!:LogtoOptions.GetClaimsFromUserInfoEndpoint"/> to <c>true</c>.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes.Identities">
<summary>
The scope name for requesting user's identities.
Logto will issue a claim to the response of the <c>userinfo</c> endpoint: <c>identities</c>.
<br/>
Note that when requesting this scope, you must set <see cref="!:LogtoOptions.GetClaimsFromUserInfoEndpoint"/> to <c>true</c>.
</summary>
</member>
<member name="T:IRaCIS.Core.API.OAuth.LogtoParameters.Claims">
<summary>
The claim names used by Logto OpenID Connect provider for ID token and userinfo endpoint.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Issuer">
<summary>
The claim name for the issuer identifier for whom issued the token.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Subject">
<summary>
The claim name for the subject identifier for whom the token is intended (user ID).
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Audience">
<summary>
The claim name for the audience that the token is intended for, which is the client ID.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Expiration">
<summary>
The claim name for the expiration time of the token (in seconds).
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.IssuedAt">
<summary>
The claim name for the time at which the token was issued (in seconds).
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Name">
<summary>
The claim name for the user's full name.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Username">
<summary>
The claim name for user's username.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Picture">
<summary>
The claim name for user's profile picture URL.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Email">
<summary>
The claim name for user's email.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.EmailVerified">
<summary>
The claim name for user's email verification status.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.PhoneNumber">
<summary>
The claim name for user's phone number.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.PhoneNumberVerified">
<summary>
The claim name for user's phone number verification status.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.CustomData">
<summary>
The claim name for user's custom data.
</summary>
</member>
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Identities">
<summary>
The claim name for user's identities.
</summary>
</member>
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.AccessToken">
<summary>
The access token issued by the Logto authorization server.
</summary>
</member>
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.TokenType">
<summary>
The type of the token issued by the Logto authorization server.
</summary>
</member>
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.ExpiresIn">
<summary>
The lifetime in seconds of the access token.
</summary>
</member>
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.RefreshToken">
<summary>
The refresh token, which can be used to obtain new access tokens using the same authorization grant.
</summary>
</member>
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.IdToken">
<summary>
The ID token, which can be used to verify the identity of the user.
</summary>
</member>
<member name="T:IRaCIS.Core.API.IpPolicyRateLimitSetup">
<summary>
IPLimit限流 启动服务
+1
View File
@@ -52,6 +52,7 @@ SerilogExtension.AddSerilogSetup(enviromentName);
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
EnvironmentName = enviromentName
});
@@ -79,6 +79,9 @@ namespace IRaCIS.Core.API
triggerOptions.AddTrigger<UserLogTrigger>();
triggerOptions.AddTrigger<UserAddTrigger>();
});
});
@@ -109,7 +109,6 @@ public static class SwaggerSetup
//路径配置,设置为空,表示直接在根域名(localhost:8001)访问该文件,
//注意localhost:8001/swagger是访问不到的,去launchSettings.json把launchUrl去掉,如果你想换一个路径,直接写名字即可,比如直接写c.Route = "doc";
options.RoutePrefix = string.Empty;
options.RoutePrefix = string.Empty;
//DocExpansion设置为none可折叠所有方法
options.DocExpansion(DocExpansion.None);
+1 -1
View File
@@ -71,7 +71,7 @@
"CompanyShortName": "Extensive Imaging",
"CompanyShortNameCN": "展影医疗",
"IsEnv_US": false,
"IsOpenErrorNoticeEmail": true,
"IsOpenErrorNoticeEmail": false,
"ErrorNoticeEmailList": [ "872297557@qq.com" ]
},
"SystemPacsConfig": {
+7 -7
View File
@@ -7,8 +7,8 @@
}
},
"ConnectionStrings": {
"RemoteNew": "Server=47.117.164.182,1434;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
"Hangfire": "Server=47.117.164.182,1434;Database=Uat_IRC.Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
"RemoteNew": "Server=101.132.253.119,1435;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
"Hangfire": "Server=101.132.253.119,1435;Database=Uat_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
},
"ObjectStoreService": {
@@ -18,11 +18,11 @@
"RegionId": "cn-shanghai",
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
"AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm",
"AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV",
"RoleArn": "acs:ram::1899121822495495:role/dev-oss-access",
"BucketName": "zy-irc-uat-store",
"ViewEndpoint": "https://zy-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
"AccessKeyId": "LTAI5tFUCCmz5TwghZHsj45Y",
"AccessKeySecret": "8evrBy1fVfzJG25i67Jm0xqn9Xcw2T",
"RoleArn": "acs:ram::1078130221702011:role/uat-oss-access",
"BucketName": "tl-med-irc-uat-store",
"ViewEndpoint": "https://tl-med-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
"Region": "oss-cn-shanghai",
"DurationSeconds": 7200
},
+8
View File
@@ -66,5 +66,13 @@
"ApiPathList": [
"/test/get"
]
},
"oauth": {
"github": {
"app_id": "github_app_id",
"app_key": "github_app_key",
"redirect_uri": "https://oauthlogin.net/oauth/githubcallback",
"scope": "repo"
}
}
}
@@ -1,196 +0,0 @@
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Domain.Share;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Localization;
using System.Text.RegularExpressions;
using ZiggyCreatures.Caching.Fusion;
using static IRaCIS.Core.Domain.Share.StaticData;
namespace IRaCIS.Core.Application.Filter;
/// <summary>
/// 主要为了 处理项目结束 锁库,不允许操作
/// </summary>
public class TrialResourceFilter : Attribute, IAsyncResourceFilter
{
private readonly IUserInfo _userInfo;
private readonly IFusionCache _fusionCache;
public IStringLocalizer _localizer;
private readonly IRepository<Trial> _trialRepository;
private readonly List<string> _trialOptList = new List<string>();
public TrialResourceFilter(IFusionCache fusionCache, IRepository<Trial> trialRepository, IStringLocalizer localizer, IUserInfo userInfo, string trialOpt = null, string trialOpt2 = null, string trialOpt3 = null)
{
_fusionCache = fusionCache;
_userInfo = userInfo;
_localizer = localizer;
_trialRepository = trialRepository;
if (!string.IsNullOrWhiteSpace(trialOpt)) _trialOptList.Add(trialOpt.Trim());
if (!string.IsNullOrWhiteSpace(trialOpt2)) _trialOptList.Add(trialOpt2.Trim());
if (!string.IsNullOrWhiteSpace(trialOpt3)) _trialOptList.Add(trialOpt3.Trim());
}
//优先选择异步的方法
public async Task OnResourceExecutionAsync(ResourceExecutingContext context, ResourceExecutionDelegate next)
{
// var typeFilter = context.ActionDescriptor.EndpointMetadata.Where(t => t.GetType() == typeof(TypeFilterAttribute)).Select(t => (TypeFilterAttribute)t).ToList().FirstOrDefault();
//var _trialOptList= typeFilter.Arguments.Select(t => t.ToString()).ToList();
// 获取当前请求的 Host 信息
var requestHost = context.HttpContext.Request.Host;
// 检查请求是否来自 localhost:6100
if (requestHost.Host == "localhost" && (requestHost.Port == 6100|| requestHost.Port==3305))
{
await next.Invoke();
return;
}
#region
// 后期列举出具体的类型,其他任何用户类型,都不允许操作
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA && _userInfo.RequestUrl.ToLower() != "TrialDocument/userConfirm".ToLower())
{
//---对不起,您的账户没有操作权限。
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_NoAccessPermission"]));
return;
}
#endregion
//TrialId 传递的途径多种,可能在path 可能在body 可能在数组中,也可能在对象中,可能就在url
var trialIdStr = string.Empty;
if (!string.IsNullOrWhiteSpace(context.HttpContext.Request.Query["trialId"]))
{
trialIdStr = context.HttpContext.Request.Query["trialId"];
}
//先尝试从path中取TrialId
else if (context.RouteData.Values.Keys.Any(t => t.Contains("trialId")))
{
var index = context.RouteData.Values.Keys.ToList().IndexOf("trialId");
trialIdStr = context.RouteData.Values.Values.ToList()[index] as string;
}
else if (context.HttpContext.Request.Headers["Referer"].ToString().Contains("trialId"))
{
var headerStr = context.HttpContext.Request.Headers["Referer"].ToString();
var trialIdIndex = headerStr.IndexOf("trialId");
var matchResult = Regex.Match(headerStr.Substring(trialIdIndex), @"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}");
if (matchResult.Success)
{
trialIdStr = matchResult.Value;
}
else
{
//---正则取请求Refer 中trialId 失败,请联系开发人员核查
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
}
}
else
{
#region body
//设置可以多次读
context.HttpContext.Request.EnableBuffering();
var reader = new StreamReader(context.HttpContext.Request.Body);
var contentFromBody = await reader.ReadToEndAsync();
//读取后,流的位置还原
context.HttpContext.Request.Body.Seek(0, SeekOrigin.Begin);
//context.HttpContext.Request.Body.Position = 0;
//找到参数位置在字符串中的索引
var trialIdIndex = contentFromBody.IndexOf("\"TrialId\"", StringComparison.OrdinalIgnoreCase);
if (trialIdIndex > -1)
{
// (?<="trialId" *: *").*?(?=",)
//使用正则 [0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}
var matchResult = Regex.Match(contentFromBody.Substring(trialIdIndex), @"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}");
if (matchResult.Success)
{
//有可能匹配错误 "trialId":"","documentId":"b8180000-3e2c-0016-9fe0-08da33f96236" 从缓存里面验证下
trialIdStr = matchResult.Value;
var trialStatusStr = await _fusionCache.GetOrSetAsync(CacheKeys.Trial(trialIdStr), _ => CacheHelper.GetTrialStatusAsync(Guid.Parse(trialIdStr), _trialRepository), TimeSpan.FromDays(7));
if (string.IsNullOrWhiteSpace(trialStatusStr))
{
//数据库 检查该项目Id不对
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
return;
}
}
else
{
//---正则取请求Refer 中trialId 失败,请联系开发人员核查
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
return;
}
//使用字符串取 如果是swagger 可能有时取的不对 因为空格的原因
//trialIdStr = contentFromBody.Substring(trialIdIndex + "TrialId".Length + 4, 3
}
#endregion
}
//通过path 或者body 找到trialId 了
if (!string.IsNullOrWhiteSpace(trialIdStr))
{
var trialStatusStr = await _fusionCache.GetOrSetAsync(CacheKeys.Trial(trialIdStr), _ => CacheHelper.GetTrialStatusAsync(Guid.Parse(trialIdStr), _trialRepository), TimeSpan.FromDays(7));
// 这里是统一拦截 项目有关的操作允许情况(特殊的地方,比如项目配置(有的在多种状态(初始化,ongoing)都可以操作,有的仅仅在Initializing)还有 项目添加和更新,不走这里,特殊处理,不然在这里显得很乱,判断是哪个接口)
if (trialStatusStr == StaticData.TrialState.TrialOngoing || _trialOptList.Any(t => t == TrialOpt.BeforeOngoingCantOpt))
{
await next.Invoke();
}
// 项目停止、或者完成 不允许操作
else
{
//---本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_InterceptedProjectStatusRule"]));
}
}
//添加项目 签名系统文档的时候 不做拦截 但是更新项目 签名项目文档的时候需要拦截
else if (_trialOptList.Any(t => t == TrialOpt.AddOrUpdateTrial || t == TrialOpt.SignSystemDocNoTrialId))
{
await next.Invoke();
}
else
{
//如果项目相关接口没有传递trialId 会来到这里,提醒,以便修改
//---该接口参数中,没有传递项目编号,请核对。
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_MissingProjectNumber"]));
}
}
}
@@ -27,6 +27,13 @@ public static class CacheKeys
//超时没请求接口自动退出
public static string UserAutoLoginOut(Guid userId) => $"UserAutoLoginOut:{userId}";
/// <summary>
/// 用户登录错误 限制登录
/// </summary>
/// <param name="userName"></param>
/// <returns></returns>
public static string UserLoginError(string userName) => $"login-failures:{userName}";
/// <summary>
/// 跳过阅片
/// </summary>
@@ -16,6 +16,7 @@ using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using System.Collections;
using System.Globalization;
using Xceed.Document.NET;
namespace IRaCIS.Core.Application.Service;
@@ -63,7 +64,7 @@ public static class ExcelExportHelper
foreach (var key in dic.Keys)
{
//是数组 那么找到对应的属性 进行翻译
if (dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
if (dic[key]!=null && dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
{
var newObjList = new List<object>();
@@ -73,39 +74,40 @@ public static class ExcelExportHelper
{
var itemDic = item.ConvertToDictionary();
//处理集合里面时间类型,根据当前语言将时间转变为字符串
foreach (var itemValuePair in itemDic)
{
if (DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
{
itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
}
}
////处理集合里面时间类型,根据当前语言将时间转变为字符串
//foreach (var itemValuePair in itemDic)
//{
// // 临床数据 11 会变成2024-01-01
// if (itemValuePair.Value?.ToString().Length > 8 && DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
// {
// itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
// }
//}
foreach (var needTranslateProperty in needTranslatePropertyList)
{
//翻译的属性依赖其他属性
if (needTranslateProperty.IsTranslateDenpendOtherProperty)
if (itemDic.Keys.Any(t => t == needTranslateProperty.Name))
{
if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
//翻译的属性依赖其他属性
if (needTranslateProperty.IsTranslateDenpendOtherProperty)
{
if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
//普通翻译 或者某一标准翻译
else
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
//普通翻译 或者某一标准翻译
else
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
itemDic.Add("No", no++);
@@ -125,6 +127,7 @@ public static class ExcelExportHelper
translateData = dic;
}
@@ -162,12 +165,55 @@ public static class ExcelExportHelper
workbook.RemoveSheetAt(1);
}
var memoryStream2 = new MemoryStream();
workbook.Write(memoryStream2, true);
//中文替换项目术语
if (data.TrialObjectNameList?.Count > 0)
{
var replaceObjectList = data.TrialObjectNameList;
var sheet = workbook.GetSheetAt(0);
int rowCount = sheet.PhysicalNumberOfRows;
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
{
var row = sheet.GetRow(rowIndex);
if (row != null)
{
var colums = row.LastCellNum;
for (int colIndex = 0; colIndex < colums; colIndex++)
{
var cell = row.GetCell(colIndex);
// 只处理字符串类型的单元格
if (cell != null)
{
var cellValue = cell.StringCellValue;
var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
if (find != null)
{
cell.SetCellValue(find.TrialName);
}
}
}
}
}
}
using (var memoryStream2 = new MemoryStream())
{
workbook.Write(memoryStream2, true);
memoryStream2.Seek(0, SeekOrigin.Begin);
templateStream = memoryStream2;
}
memoryStream2.Seek(0, SeekOrigin.Begin);
templateStream = memoryStream2;
}
// 文件名称 从sheet里面取
@@ -277,7 +323,7 @@ public static class ExcelExportHelper
foreach (var key in dic.Keys)
{
//是数组 那么找到对应的属性 进行翻译
if (dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
if (dic[key] != null && dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
//if (dic[key].GetType().IsAssignableFrom(typeof(JArray)))
{
@@ -289,36 +335,40 @@ public static class ExcelExportHelper
//var itemDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(item.ToJsonNotIgnoreNull());
var itemDic = item.ConvertToDictionary();
//处理集合里面时间类型,根据当前语言将时间转变为字符串
foreach (var itemValuePair in itemDic)
{
if (DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
{
itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
}
}
////处理集合里面时间类型,根据当前语言将时间转变为字符串
//foreach (var itemValuePair in itemDic)
//{
// if (itemValuePair.Value?.ToString().Length > 8 && DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
// {
// itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
// }
//}
foreach (var needTranslateProperty in needTranslatePropertyList)
{
//翻译的属性依赖其他属性
if (needTranslateProperty.IsTranslateDenpendOtherProperty)
if (itemDic.Keys.Any(t => t == needTranslateProperty.Name))
{
if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
//翻译的属性依赖其他属性
if (needTranslateProperty.IsTranslateDenpendOtherProperty)
{
if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
//普通翻译 或者某一标准翻译
else
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
//普通翻译 或者某一标准翻译
else
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
@@ -371,6 +421,42 @@ public static class ExcelExportHelper
workbook.RemoveSheetAt(1);
}
//中文替换项目术语
if (data.TrialObjectNameList?.Count > 0)
{
var replaceObjectList = data.TrialObjectNameList;
var sheet = workbook.GetSheetAt(0);
int rowCount = sheet.PhysicalNumberOfRows;
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
{
var row = sheet.GetRow(rowIndex);
if (row != null)
{
var colums = row.LastCellNum;
for (int colIndex = 0; colIndex < colums; colIndex++)
{
var cell = row.GetCell(colIndex);
// 只处理字符串类型的单元格
if (cell != null)
{
var cellValue = cell.StringCellValue;
var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
if (find != null)
{
cell.SetCellValue(find.TrialName);
}
}
}
}
}
}
if (dynamicColumnConfig != null)
{
@@ -391,7 +477,7 @@ public static class ExcelExportHelper
var originTotalEndIndex = dynamicColumnConfig.TempalteLastColumnIndex;
//减去动态移除后原始结束索引
var originRemoveEndIndex= originTotalEndIndex- dynamicRemoveColunmCount;
var originRemoveEndIndex = originTotalEndIndex - dynamicRemoveColunmCount;
//最终表 动态列开始索引
var dynamicColunmStartIndex = dynamicColumnConfig.AutoColumnStartIndex - beforeDynamicRemoveCount;
@@ -451,6 +537,7 @@ public static class ExcelExportHelper
var name = dynamicColumnConfig.ColumnNameList[i - dynamicColunmStartIndex];
titelRow.GetCell(i).SetCellValue(name);
templateRow.GetCell(i).SetCellValue("");
}
}
@@ -463,7 +550,6 @@ public static class ExcelExportHelper
templateStream = memoryStream2;
}
}
#endregion
@@ -513,8 +599,8 @@ public static class ExcelExportHelper
//var writeIndex = itemList.IndexOf(itemObj) + dynamicColumnConfig.AutoColumnStartIndex;
var writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
var writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
if (itemDicName.IsNotNullOrEmpty())
{
@@ -73,6 +73,12 @@ namespace IRaCIS.Core.Application.Helper
case EmailBusinessScenario.QCToCRCImageQuestion:
HangfireJobHelper.AddOrUpdateCronJob<IMediator>(jobId, t => t.Send(new QCImageQuestionRecurringEvent() { TrialId = trialId }, default), emailCron);
break;
//加急阅片 10分钟
case EmailBusinessScenario.ExpeditedReading:
HangfireJobHelper.AddOrUpdateCronJob<IMediator>(jobId, t => t.Send(new UrgentIRUnReadTaskRecurringEvent() { TrialId = trialId }, default), emailCron);
break;
default:
break;
}
@@ -32,6 +32,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="IdentityModel.OidcClient" Version="6.0.0" />
<PackageReference Include="AlibabaCloud.SDK.Sts20150401" Version="1.1.4" />
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.400.36" />
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.14.1" />
@@ -69,4 +70,8 @@
<ProjectReference Include="..\IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Service\MinimalApiService\CodeTemplate\FrontTemplate\" />
</ItemGroup>
</Project>
@@ -549,23 +549,134 @@
系统模板文档配置表
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.Common.DevelopService">
<member name="T:IRaCIS.Core.Application.Service.DictionaryService">
<summary>
开始时候一些帮助 比如根据配置的字典生成枚举
数据字典-基础数据维护
</summary>
<param name="_dictionaryRepository"></param>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.DevelopService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DoctorDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
<summary>
开始时候一些帮助 比如根据配置的字典生成枚举
数据字典-基础数据维护
</summary>
<param name="_dictionaryRepository"></param>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.DevelopService.BackDicGenerateEnum(System.String)">
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBoolDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
<summary>
根据配置的字典名生成后端枚举
添加bool
</summary>
<param name="dicName"></param>
<param name="addOrEditBasic"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAllDictionaryKey">
<summary>
获取所有字典的Key
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBasicDicAndChild(IRaCIS.Application.Contracts.AddBasicDicAndChild)">
<summary>
添加字典 的同时 一起添加子项 --New
</summary>
<param name="addBasicDicAndChild"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDicList(IRaCIS.Application.Contracts.BasicDicQuery)">
<summary>
New 查询条件
</summary>
<param name="inQuery"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddOrUpdateBasicDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
<summary>
添加和编辑
</summary>
<param name="addOrEditBasic"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetChildList(System.Guid)">
<summary>
获取子项数组
</summary>
<param name="parentId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.DeleteDictionary(System.Guid)">
<summary> 删除字典数据 </summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String[])">
<summary>
传递父亲 code 字符串 数组 返回多个下拉框数据
</summary>
<param name="searchArray"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String)">
<summary>
根据父亲Code 获取单个下拉框数据
</summary>
<param name="searchKey"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicConfigSelect(System.String)">
<summary>
根据父亲字典分组 获取子项
</summary>
<param name="searchKey"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionaryList(IRaCIS.Application.Contracts.GetCriterionDictionaryListInDto)">
<summary>
获取标准字典
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetTrialCriterionDictionaryList(IRaCIS.Application.Contracts.GetTrialCriterionDictionaryListInDto)">
<summary>
获取标准字典
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionary(IRaCIS.Application.Contracts.GetCriterionDictionaryInDto)">
<summary>
获取标准指定字典
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataAllSelect(IRaCIS.Application.Contracts.GetBasicDataAllSelectInDto)">
<summary>
获取所有下拉框 枚举 bool 数据
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBoolValueState(System.Boolean)">
<summary>
获取是和否
</summary>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAuditState``1(System.Guid,``0)">
<summary>
获取审核状态
</summary>
<typeparam name="T"></typeparam>
<param name="trial"></param>
<param name="childCode"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.GetEventStoreRecordList(IRaCIS.Core.Application.ViewModel.EventStoreRecordQuery)">
<summary>
邮件事件消息列表
</summary>
<param name="inQuery"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.RePublishEvent(System.Guid)">
<summary>
重新发布失败的事件消息
</summary>
<param name="eventId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.TrialUserListExport(IRaCIS.Application.Contracts.TrialMaintenanceExportQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser})">
@@ -781,31 +892,23 @@
影像检查列表-患者为维度组织
</summary>
<param name="inQuery"></param>
<param name="_patientRepository"></param>
<param name="_dictionaryService"></param>
<param name="_trialRepository"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetSelfAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetEmailNoticeConfigList_Export(IRaCIS.Core.Application.Contracts.EmailNoticeConfigQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},IRaCIS.Application.Interfaces.IDictionaryService)">
<summary>
自身一致性分析(仅做了resist1.1)
邮件导出
</summary>
<param name="inQuery"></param>
<param name="_commonDocumentRepository"></param>
<param name="_emailNoticeConfigrepository"></param>
<param name="_dictionaryService"></param>
<param name="_trialRepository"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetGroupAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
<summary>
组件一致性分析(仅做了resist1.1)
</summary>
<param name="inQuery"></param>
<param name="_commonDocumentRepository"></param>
<param name="_dictionaryService"></param>
<param name="_trialRepository"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
<summary>
一致性分析结果导出 9 10 分别是自身 和组件一致性
一致性分析结果导出 7 8 分别是自身 和组件一致性
</summary>
<param name="inQuery"></param>
<param name="_commonDocumentRepository"></param>
@@ -830,7 +933,7 @@
<param name="_trialRepository"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetCommonJudgeRatioList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetCommonJudgeRatioList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
<summary>
裁判一致率导出
</summary>
@@ -841,136 +944,6 @@
<returns></returns>
<exception cref="T:System.Exception"></exception>
</member>
<member name="T:IRaCIS.Core.Application.Service.DictionaryService">
<summary>
数据字典-基础数据维护
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DoctorDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
<summary>
数据字典-基础数据维护
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBoolDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
<summary>
添加bool
</summary>
<param name="addOrEditBasic"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAllDictionaryKey">
<summary>
获取所有字典的Key
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBasicDicAndChild(IRaCIS.Application.Contracts.AddBasicDicAndChild)">
<summary>
添加字典 的同时 一起添加子项 --New
</summary>
<param name="addBasicDicAndChild"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDicList(IRaCIS.Application.Contracts.BasicDicQuery)">
<summary>
New 查询条件
</summary>
<param name="inQuery"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddOrUpdateBasicDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
<summary>
添加和编辑
</summary>
<param name="addOrEditBasic"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetChildList(System.Guid)">
<summary>
获取子项数组
</summary>
<param name="parentId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.DeleteDictionary(System.Guid)">
<summary> 删除字典数据 </summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String[])">
<summary>
传递父亲 code 字符串 数组 返回多个下拉框数据
</summary>
<param name="searchArray"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String)">
<summary>
根据父亲Code 获取单个下拉框数据
</summary>
<param name="searchKey"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicConfigSelect(System.String)">
<summary>
根据父亲字典分组 获取子项
</summary>
<param name="searchKey"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionaryList(IRaCIS.Application.Contracts.GetCriterionDictionaryListInDto)">
<summary>
获取标准字典
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetTrialCriterionDictionaryList(IRaCIS.Application.Contracts.GetTrialCriterionDictionaryListInDto)">
<summary>
获取标准字典
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionary(IRaCIS.Application.Contracts.GetCriterionDictionaryInDto)">
<summary>
获取标准指定字典
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataAllSelect(IRaCIS.Application.Contracts.GetBasicDataAllSelectInDto)">
<summary>
获取所有下拉框 枚举 bool 数据
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBoolValueState(System.Boolean)">
<summary>
获取是和否
</summary>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAuditState``1(System.Guid,``0)">
<summary>
获取审核状态
</summary>
<typeparam name="T"></typeparam>
<param name="trial"></param>
<param name="childCode"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.GetEventStoreRecordList(IRaCIS.Core.Application.ViewModel.EventStoreRecordQuery)">
<summary>
邮件事件消息列表
</summary>
<param name="inQuery"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.RePublishEvent(System.Guid)">
<summary>
重新发布失败的事件消息
</summary>
<param name="eventId"></param>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.Application.Service.ExploreRecommendService">
<summary>
ExploreRecommendService
@@ -1166,13 +1139,20 @@
<param name="indto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DoctorService.UpdateGneralSituation(IRaCIS.Application.Contracts.UpdateGneralSituationDto)">
<member name="M:IRaCIS.Core.Application.Service.DoctorService.AddOrUpdateGneralSituation(IRaCIS.Application.Contracts.SummarizeInfoDto)">
<summary>
修改概述
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DoctorService.DeleteSummarizeInfo(IRaCIS.Application.Contracts.DeleteSummarizeInfoInDto)">
<summary>
删除概述
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.DoctorService.GetSummarizeInfo(IRaCIS.Application.Contracts.GetSummarizeInfoInDto)">
<summary>
获取概述
@@ -1337,6 +1317,13 @@
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.VacationService.GetIsVacation(IRaCIS.Application.Contracts.GetIsVacationInDto)">
<summary>
获取是否休假
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.Application.Service.TrialEmailNoticeConfigService">
<summary>
TrialEmailNoticeConfigService
@@ -2324,6 +2311,21 @@
<param name="password"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.CodeTemplateService.GetDataBaseTableList(System.String,System.String)">
<summary>
获取数据库的表信息 以及字段信息
</summary>
<param name="tableName"></param>
<param name="comment"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.CodeTemplateService.GenerateEnumDefine(System.String)">
<summary>
根据字典名 code 生成枚举定义
</summary>
<param name="code"></param>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService">
<summary>
上传文件转PDF 或者给url 这边下载然后转PDF
@@ -2339,7 +2341,176 @@
<param name="_hostEnvironment"></param>
</member>
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService" -->
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo)" -->
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Infra.EFCore.TestLength})" -->
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.TestEfcoreJson">
<summary>
测试efcore json 列支持情况
https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.HIRActivateService.GetAuthorizationCodeInfo(System.String,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption})">
<summary>
获取授权码明文信息
</summary>
<param name="authorizationCode"></param>
<param name="_hospitalOption"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.HIRActivateService.GetTrialActivationCode(IRaCIS.Core.Application.Service.TrialAuthorizationInfo,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption})">
<summary>
获取项目激活码
</summary>
<param name="_basicSystemConfigConfig"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.OAuthService.TestClientCredentialsAsync">
<summary>
测试客户端凭证代码
</summary>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Tokens">
<summary>
The token names used by Cookie and OpenID Connect middleware to store and retrieve tokens from
Logto OpenID Connect provider.
<br/>
See <see href="https://github.com/dotnet/aspnetcore/blob/4a9118c674a798aaf6379b4b7b2d8787bc688f96/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectHandler.cs#L994-L1035">tokens that are stored by OpenID Connect middleware</see> for more details.
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes">
<summary>
The scope names used by Logto OpenID Connect provider to request for user information.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes.Email">
<summary>
The scope name for requesting user's email.
Logto will issue two claims to the ID token: <c>email</c> and <c>email_verified</c>.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes.Phone">
<summary>
The scope name for requesting user's phone number.
Logto will issue two claims to the ID token: <c>phone</c> and <c>phone_verified</c>.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes.CustomData">
<summary>
The scope name for requesting user's custom data.
Logto will issue a claim to the response of the <c>userinfo</c> endpoint: <c>custom_data</c>.
<br/>
Note that when requesting this scope, you must set <see cref="!:LogtoOptions.GetClaimsFromUserInfoEndpoint"/> to <c>true</c>.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes.Identities">
<summary>
The scope name for requesting user's identities.
Logto will issue a claim to the response of the <c>userinfo</c> endpoint: <c>identities</c>.
<br/>
Note that when requesting this scope, you must set <see cref="!:LogtoOptions.GetClaimsFromUserInfoEndpoint"/> to <c>true</c>.
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims">
<summary>
The claim names used by Logto OpenID Connect provider for ID token and userinfo endpoint.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Issuer">
<summary>
The claim name for the issuer identifier for whom issued the token.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Subject">
<summary>
The claim name for the subject identifier for whom the token is intended (user ID).
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Audience">
<summary>
The claim name for the audience that the token is intended for, which is the client ID.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Expiration">
<summary>
The claim name for the expiration time of the token (in seconds).
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.IssuedAt">
<summary>
The claim name for the time at which the token was issued (in seconds).
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Name">
<summary>
The claim name for the user's full name.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Username">
<summary>
The claim name for user's username.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Picture">
<summary>
The claim name for user's profile picture URL.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Email">
<summary>
The claim name for user's email.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.EmailVerified">
<summary>
The claim name for user's email verification status.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.PhoneNumber">
<summary>
The claim name for user's phone number.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.PhoneNumberVerified">
<summary>
The claim name for user's phone number verification status.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.CustomData">
<summary>
The claim name for user's custom data.
</summary>
</member>
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Identities">
<summary>
The claim name for user's identities.
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.AccessToken">
<summary>
The access token issued by the Logto authorization server.
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.TokenType">
<summary>
The type of the token issued by the Logto authorization server.
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.ExpiresIn">
<summary>
The lifetime in seconds of the access token.
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.RefreshToken">
<summary>
The refresh token, which can be used to obtain new access tokens using the same authorization grant.
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.IdToken">
<summary>
The ID token, which can be used to verify the identity of the user.
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.QCCommon.VerifyIsCRCSubmmitAsync(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Domain.Share.IUserInfo,System.Nullable{System.Guid})">
<summary>
验证CRC 是否已提交 已提交 就不允许进行任何操作,如果是IQC 那么还验证是否是当前任务领取人
@@ -5559,6 +5730,13 @@
影像阅片临床数据签名
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.ReadingClinicalDataService.GetVisitClinicalDataName(IRaCIS.Core.Application.Service.Reading.Dto.GetVisitClinicalDataNameInDto)">
<summary>
获取访视临床数据名称
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.ReadingClinicalDataService.GetTrialClinicalDataSelect(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectIndto)">
<summary>
获取下拉菜单
@@ -7112,6 +7290,11 @@
上传时间
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.GetVisitClinicalDataNameInDto">
<summary>
获取临床数据名称
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectIndto.TrialId">
<summary>
项目ID
@@ -12733,8 +12916,12 @@
暂时不用
<summary> 获取项目访视计划</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.VisitPlanService.GetVisitStageList(System.Guid)">
<summary> 根据项目Id,获取项目访视计划(不分页)[New]</summary>
<member name="M:IRaCIS.Core.Application.Service.VisitPlanService.GetVisitStageList(IRaCIS.Application.Contracts.GetVisitStageListInDto)">
<summary>
根据项目Id,获取项目访视计划
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.VisitPlanService.GetTrialVisitStageSelect(System.Guid)">
<summary>
@@ -12889,10 +13076,12 @@
参考处理链接: https://learn.microsoft.com/zh-cn/aspnet/core/fundamentals/error-handling?view=aspnetcore-8.0
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Filter.TrialResourceFilter">
<member name="M:IRaCIS.Core.Application.Helper.CacheKeys.UserLoginError(System.String)">
<summary>
主要为了 处理项目结束 锁库,不允许操作
用户登录错误 限制登录
</summary>
<param name="userName"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Helper.CacheKeys.SkipReadingCacheKey(System.Guid)">
<summary>
@@ -15172,6 +15361,13 @@
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.UseEmialGetDoctorInfo(IRaCIS.Core.Application.Contracts.UseEmialGetDoctorInfoInDto)">
<summary>
根据邮箱获取DoctorId 没有的话创建一个
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.VerifyEmialGetDoctorInfo(IRaCIS.Core.Application.Contracts.VerifyEmialGetDoctorInfoInDto)">
<summary>
验证邮箱验证码 获取医生信息Id
@@ -16731,6 +16927,35 @@
<param name="trialConfig"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetTrialBodyPartList(System.Guid)">
<summary>
获取项目部位配置列表
</summary>
<param name="trialId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.TrialConfigService.AddOrUpdateTrialBodyPart(IRaCIS.Core.Application.Contracts.AddOrUpdateTrialBodyPartCommand)">
<summary>
添加更新 项目部位配置
</summary>
<param name="incommand"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetTrialExtralConfig(System.Guid)">
<summary>
获取项目额外配置
</summary>
<param name="trialId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetTrialPacsConfigInfo(System.Guid,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemPacsConfig})">
<summary>
获取项目Pacs 配置
</summary>
<param name="trialId"></param>
<param name="optionsMonitor"></param>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.Application.Triggers.ChallengeStateTrigger">
<summary>
访视 质疑状态 触发修改
@@ -17046,16 +17271,56 @@
银行手机号
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.UpdateGneralSituationDto.Summarize">
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.DoctorId">
<summary>
医生Id
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.Summarize">
<summary>
概述
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.UpdateGneralSituationDto.SummarizeEn">
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.SummarizeEn">
<summary>
概述
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.IsMain">
<summary>
是否是主模板
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.Indication">
<summary>
适应症
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.IndicationEn">
<summary>
适应症
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.TrialId">
<summary>
项目Id
</summary>
</member>
<member name="F:IRaCIS.Application.Contracts.SaveSummarizeInfo.SaveSelf">
<summary>
保存自己
</summary>
</member>
<member name="F:IRaCIS.Application.Contracts.SaveSummarizeInfo.SaveAndCover">
<summary>
保存并覆盖
</summary>
</member>
<member name="F:IRaCIS.Application.Contracts.SaveSummarizeInfo.SaveAndAdd">
<summary>
保存并新增
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.WorkPartTime">
<summary>
工作兼职
@@ -91,7 +91,7 @@ public class UrgentMedicalReviewAddedEventConsumer(
new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), },
new DictionaryDto (){DictionaryCode= "MedicalReviewDoctorUserIdea",EnumValue=medicalReview.DoctorUserIdeaEnum.GetEnumInt(), },
new DictionaryDto (){DictionaryCode= "MedicalReviewAuditState",EnumValue=medicalReview.AuditState.GetEnumInt(), },
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString(), }
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), }
}
}) ;
@@ -192,7 +192,7 @@ public class UrgentIRRepliedMedicalReviewConsumer(
new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), },
new DictionaryDto (){DictionaryCode= "MedicalReviewDoctorUserIdea",EnumValue=medicalReview.DoctorUserIdeaEnum.GetEnumInt(), },
new DictionaryDto (){DictionaryCode= "MedicalReviewAuditState",EnumValue=medicalReview.AuditState.GetEnumInt(), },
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString(), }
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), }
}
});
@@ -299,9 +299,9 @@ public class UrgentMIMRepliedMedicalReviewConsumer(
DictionaryList = new List<DictionaryDto>()
{
new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), },
new DictionaryDto (){DictionaryCode= "IsPass",EnumValue=medicalReview.IsHaveQuestion.ToString(), },// 审核结论
new DictionaryDto (){DictionaryCode= "IsPass",EnumValue=medicalReview.IsHaveQuestion.ToString().ToLower(), },// 审核结论
new DictionaryDto (){DictionaryCode= "AuditAdvice",EnumValue=medicalReview.AuditAdviceEnum.GetEnumInt(), },// 审核建议
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString(), }, //是否加急
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), }, //是否加急
@@ -110,10 +110,10 @@ public class UserSiteSurveySubmitedEventConsumer(
return (topicStr, htmlBodyStr);
};
var scenario = _trialSiteSurveyRepository.Any(t => t.Id != trialSiteSurveyId && t.TrialId == siteSurveyInfo.TrialId && t.TrialSiteId == siteSurveyInfo.TrialSiteId) ?
var scenario = _trialSiteSurveyRepository.Where(t => t.Id != trialSiteSurveyId && t.TrialId == siteSurveyInfo.TrialId && t.TrialSiteId == siteSurveyInfo.TrialSiteId).IgnoreQueryFilters().Any() ?
EmailBusinessScenario.Approval_UpdateSiteSurvey : EmailBusinessScenario.Approval_SubmitSiteSurvey;
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository, EmailBusinessScenario.Approval_SubmitSiteSurvey, messageToSend, emailConfigFunc);
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository, scenario, messageToSend, emailConfigFunc);
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
@@ -174,7 +174,7 @@ public class SiteSurveySPMSubmitedEventConsumer(
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
{
var topicStr = string.Format(input.topicStr, companyName, trialInfo.ResearchProgramNo);
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo);
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
toUserName,
siteInfo.TrialSiteCode,
@@ -274,7 +274,7 @@ public class SiteSurverRejectedEventConsumer(
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
{
var topicStr = string.Format(input.topicStr, companyName, trialInfo.ResearchProgramNo);
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo);
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
toUserName,
trialInfo.TrialCode,
@@ -73,12 +73,17 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
}
});
foreach (var userinfo in userinfoList)
{
var messageToSend = new MimeMessage();
//发件地址
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
foreach (var userinfo in userinfoList)
{
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
}
var userNames = userinfoList.Select(x => x.FullName).ToList();
foreach (var pm in pmandAPm)
{
@@ -95,7 +100,7 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
var htmlBodyStr = string.Format(
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
userinfo.FullName, // 用户名 {0}
string.Join(',', userNames), // 用户名 {0}
trialInfo.ExperimentName, // 项目 {1}
subjectCode, // 受试者 {2}
subjectVisit.VisitName, // 访视 {3}
@@ -113,7 +118,7 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
messageToSend, emailConfigFunc);
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
}
}
}
@@ -181,7 +186,7 @@ public class CRCRepliedQCChallengeEventConsumer(
IsEn_US = isEn_US,
DictionaryList = new List<DictionaryDto>()
{
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString(), }, //是否关闭
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString().ToLower(), }, //是否关闭
}
});
@@ -234,7 +239,22 @@ public class QCRepliedQCChallengeEventConsumer(
{
Console.WriteLine("发送(014015) 【 QC回复 质控质疑,通知CRC】邮件!!!");
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
var qCChallengeDialog = await _qCChallengeDialogRepository.Where(x => x.Id == context.Message.QCChallengeDialogId).Include(x => x.QCChallenge).FirstNotNullAsync();
string talkContent = string.Empty;
var isclose = false;
if (context.Message.QCChallengeDialogId != null)
{
var qCChallengeDialog = await _qCChallengeDialogRepository.Where(x => x.Id == context.Message.QCChallengeDialogId.Value).Include(x => x.QCChallenge).FirstNotNullAsync();
talkContent = qCChallengeDialog.TalkContent;
isclose = qCChallengeDialog.QCChallenge.IsClosed;
}
else if(context.Message.QCChallengeId != null)
{
var qCChallenge = await _qCChallengeRepository.Where(x => x.Id == context.Message.QCChallengeId.Value).FirstNotNullAsync();
talkContent = qCChallenge.Content;
isclose = qCChallenge.IsClosed;
}
var subjectVisitId = context.Message.SubjectVisitId;
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
@@ -257,7 +277,7 @@ public class QCRepliedQCChallengeEventConsumer(
IsEn_US = isEn_US,
DictionaryList = new List<DictionaryDto>()
{
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString(), }, //是否关闭
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=isclose.ToString().ToLower(), }, //是否关闭
}
});
@@ -285,12 +305,12 @@ public class QCRepliedQCChallengeEventConsumer(
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
var htmlBodyStr = string.Format(
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
userinfo.FullName, // 用户名 {0}
trialInfo.ExperimentName, // 项目 {1}
userinfo.FullName, // 用户名 {1}
subjectCode, // 受试者 {2}
subjectVisit.VisitName, // 访视 {3}
dictionValue[0], // 质疑是否关闭 {4}
qCChallengeDialog.TalkContent, // 质疑内容 {5}
talkContent, // 质疑内容 {5}
_systemEmailConfig.SiteUrl // 链接 {65}
);
@@ -376,8 +396,8 @@ public class CRCRepliedCheckChallengeEventConsumer(
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
var htmlBodyStr = string.Format(
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
trialInfo.ExperimentName, // 项目 {1}
userinfo.FullName, // 用户名 {1}
userinfo.FullName, // 用户名 {0}
trialInfo.ExperimentName, // 项目 {1}
subjectCode, // 受试者 {2}
subjectVisit.VisitName, // 访视 {3}
dictionValue[0], // 核查状态 {4}
@@ -424,7 +444,7 @@ public class PMRepliedCheckChallengeEventConsumer(
var checkChallengeDialog = await _checkChallengeDialogRepository.Where(x => x.Id == context.Message.CheckChallengeDialogId).FirstNotNullAsync();
var subjectVisitId = context.Message.SubjectVisitId;
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.NoneDicomStudyList).Include(x => x.StudyList).Include(x => x.Subject).FirstNotNullAsync();
var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
@@ -434,24 +454,12 @@ public class PMRepliedCheckChallengeEventConsumer(
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
string json = checkChallengeDialog.ParamInfo;
List<string> modalities = new List<string>();
if (json.IsNotNullOrEmpty())
{
List<Dictionary<string, string>> studies = JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(json);
foreach (var study in studies)
{
if (study.ContainsKey("Modality"))
{
modalities.Add(study["Modality"]);
}
}
}
modalities =subjectVisit.NoneDicomStudyList.Select(t => t.Modality)
.Union(subjectVisit.StudyList.Select(k => k.ModalityForEdit)).ToList();
modalities = modalities.Distinct().ToList();
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
{
DictionaryRepository = _dictionaryRepository,
@@ -697,7 +705,7 @@ public class QCClaimTaskEventConsumer(
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
context.Message.IsPd ? EmailBusinessScenario.PDVerification_PendingImageQCClaim : EmailBusinessScenario.EligibilityVerification_PendingClaim,
context.Message.IsPd ? EmailBusinessScenario.PDVerification_PendingImageQC : EmailBusinessScenario.EligibilityVerification_PendingImageQC,
messageToSend, emailConfigFunc);
@@ -1,4 +1,5 @@
using IRaCIS.Application.Contracts;
using DocumentFormat.OpenXml;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Application.MassTransit.Consumer;
@@ -43,7 +44,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
IsEn_US = isEn_US,
DictionaryList = new List<DictionaryDto>()
{
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue="1" }
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue="true" }
}
});
@@ -63,19 +64,19 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
});
foreach (var trialUser in trialUserList)
foreach (var trialUser in trialUserList)
{
var userId=trialUser.UserId;
var userId = trialUser.UserId;
var doctorCriterionList = await _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.Trial.TrialUserList.Any(t => t.UserId == userId))
.Select(c => new
var doctorCriterionList = await _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.TrialId == trialId && t.Trial.TrialUserList.Any(t => t.UserId == userId))
.Select(c => new
{
TrialReadingCriterionId = c.Id,
CriterionName=c.CriterionName,
CriterionName = c.CriterionName,
UnReadList = c.VisitTaskList
UnReadList = c.VisitTaskList.Where(t => t.ExpetidEmailNoticeTime == null) //没有被通知
.Where(t => t.DoctorUserId == userId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
// 前序 不存在 未一致性核查未通过的
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
@@ -84,69 +85,84 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
.Where(t=> t.SourceSubjectVisit.PDState==PDStateEnum.PDProgress || t.SourceSubjectVisit.IsEnrollmentConfirm ||
.Where(t => t.SourceSubjectVisit.PDState == PDStateEnum.PDProgress || t.SourceSubjectVisit.IsEnrollmentConfirm ||
t.ReadModule.SubjectVisit.PDState == PDStateEnum.PDProgress || t.ReadModule.SubjectVisit.IsEnrollmentConfirm)
.Select(c=>new
.Select(c => new
{
SubejctCode= c.IsAnalysisCreate? c.BlindSubjectCode: c.Subject.Code,
c.TaskBlindName,
c.TaskName
SubejctCode = c.IsAnalysisCreate ? c.BlindSubjectCode : c.Subject.Code,
c.TaskBlindName,
c.TaskName,
VisitTaskId = c.Id
}).ToList()
}).ToListAsync();
var toTalUnreadCount= doctorCriterionList.SelectMany(t=>t.UnReadList).Count();
var toTalUnreadCount = doctorCriterionList.SelectMany(t => t.UnReadList).Count();
var messageToSend = new MimeMessage();
//发件地址
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
messageToSend.To.Add(new MailboxAddress(trialUser.FullName, trialUser.EMail));
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
if (toTalUnreadCount > 0)
{
var topicStr = string.Format(input.topicStr, trialUser.ResearchProgramNo);
var messageToSend = new MimeMessage();
var template = input.htmlBodyStr;
//发件地址
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
messageToSend.To.Add(new MailboxAddress(trialUser.FullName, trialUser.EMail));
//正则提取循环的部分 {%for%}(.*?){%end for%}
string pattern = @"{%for%}(.*?){%end for%}";
var match = Regex.Match(template, pattern, RegexOptions.Singleline);
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
string criteriaTemplate = match.Groups[1].Value; // 提取循环模板
// 构建循环内容
string criteriaDetails = "";
foreach (var criteria in doctorCriterionList)
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
{
criteriaDetails += string.Format(criteriaTemplate, criteria.CriterionName, criteria.UnReadList.Select(t=>t.SubejctCode).Distinct().Count(), criteria.UnReadList.Count());
}
var topicStr = string.Format(input.topicStr, trialUser.ResearchProgramNo);
// 用循环内容替换原始模板中的循环部分
string emailContent = Regex.Replace(template, pattern, criteriaDetails);
var template = input.htmlBodyStr;
//正则提取循环的部分 {%for%}(.*?){%end for%}
string pattern = @"{%for%}(.*?){%end for%}";
var match = Regex.Match(template, pattern, RegexOptions.Singleline);
string criteriaTemplate = match.Groups[1].Value; // 提取循环模板
// 构建循环内容
string criteriaDetails = "";
foreach (var criteria in doctorCriterionList)
{
if (criteria.UnReadList.Count() > 0)
{
criteriaDetails += string.Format(criteriaTemplate, criteria.CriterionName, criteria.UnReadList.Select(t => t.SubejctCode).Distinct().Count(), criteria.UnReadList.Count());
}
}
// 用循环内容替换原始模板中的循环部分
string emailContent = template.Replace(criteriaTemplate, criteriaDetails).Replace("{%for%}", "").Replace("{%end for%}", "");
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
trialUser.FullName,
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
toTalUnreadCount,
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, emailContent),
trialUser.FullName,
trialUser.ResearchProgramNo,
dictionValue[0],
_systemEmailConfig.SiteUrl
);
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
toTalUnreadCount,
return (topicStr, htmlBodyStr);
};
trialUser.ResearchProgramNo,
dictionValue[0],
_systemEmailConfig.SiteUrl
);
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository, EmailBusinessScenario.ExpeditedReading, messageToSend, emailConfigFunc);
return (topicStr, htmlBodyStr);
};
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository, EmailBusinessScenario.ExpeditedReading, messageToSend, emailConfigFunc);
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
//处理标记已通知的任务
var visitTaskIdList = doctorCriterionList.Where(t => t.UnReadList.Count() > 0).SelectMany(t => t.UnReadList.Select(u => u.VisitTaskId)).ToList();
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => visitTaskIdList.Contains(t.Id), u => new VisitTask() { ExpetidEmailNoticeTime = DateTime.Now });
}
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
}
@@ -227,7 +227,7 @@ namespace IRaCIS.Core.Application.Service
{
var lastTask = (subject.VisitTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.ArmEnum==lastTask.ArmEnum && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
if (existGlobal == null)
@@ -469,7 +469,7 @@ namespace IRaCIS.Core.Application.Service
var lastTask = (subjectAddTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskGroupSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.ArmEnum == lastTask.ArmEnum && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskGroupSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
if (existGlobal == null)
@@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(queryCommonDocument.CriterionTypeEnum != null, t => t.CriterionTypeEnum == queryCommonDocument.CriterionTypeEnum)
.WhereIf(queryCommonDocument.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryCommonDocument.BusinessScenarioEnum)
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Code), t => t.Code.Contains(queryCommonDocument.Code))
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name))
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name) || t.NameCN.Contains(queryCommonDocument.Name))
.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument);
@@ -3,7 +3,9 @@
// 生成时间 2022-02-15 11:55:57
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.Contracts
{
public class TrialSelectEmailNoticeConfigView : EmailNoticeConfigView
@@ -62,7 +64,15 @@ namespace IRaCIS.Core.Application.Contracts
public bool? IsDistinguishCriteria { get; set; }
public SysEmailLevel? SystemLevel { get; set; }
public int? BusinessModuleEnum { get; set; }
public BusinessModule? BusinessModuleEnum { get; set; }
public int? EmailUrgentEnum { get; set; }
public UserTypeEnum? ToUserType { get; set; }
public UserTypeEnum? CopyUserType { get; set; }
public BusinessLevel? BusinessLevelEnum { get; set; }
}
@@ -133,8 +143,41 @@ namespace IRaCIS.Core.Application.Contracts
}
public class EmailNoticeConfigExportDto
{
public Guid? Id { get; set; }
public string Code { get; set; } = String.Empty;
[DictionaryTranslate("Email_BusinessScenario")]
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
[DictionaryTranslate("YesOrNo")]
public bool IsDistinguishCriteria { get; set; }
[DictionaryTranslate("CriterionType")]
public CriterionType? CriterionTypeEnum { get; set; }
[DictionaryTranslate("BusinessModule")]
public int BusinessModuleEnum { get; set; }
[DictionaryTranslate("BusinessLevel")]
public int BusinessLevelEnum { get; set; }
[DictionaryTranslate("EmailUrgent")]
public int EmailUrgentEnum { get; set; }
public string Description { get; set; } = string.Empty;
public string EmailTopic { get; set; } = string.Empty;
public string EmailTopicCN { get; set; } = string.Empty;
}
}
@@ -1,25 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace IRaCIS.Core.Application.Service.Common
{
/// <summary>
/// 开始时候一些帮助 比如根据配置的字典生成枚举
/// </summary>
/// <param name="_dictionaryRepository"></param>
[ApiExplorerSettings(GroupName = "Common")]
public class DevelopService(IRepository<Dictionary> _dictionaryRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
{
/// <summary>
/// 根据配置的字典名生成后端枚举
/// </summary>
/// <param name="dicName"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> BackDicGenerateEnum(string dicName)
{
return ResponseOutput.Ok();
}
}
}
@@ -26,37 +26,6 @@ namespace IRaCIS.Core.Application.Service
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IDictionaryService
{
public async Task<IResponseOutput> GenerateEnumDefine(string code)
{
var searchList = await _dicRepository.Where(t => t.Parent.Code == code && t.ParentId != null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
// StringBuilder 用于构建枚举代码字符串
var enumCode = new StringBuilder();
// 生成枚举定义
enumCode.AppendLine($"public enum {code}");
enumCode.AppendLine("{");
foreach (var item in searchList)
{
// 添加 XML 注释作为枚举描述
enumCode.AppendLine($" /// <summary>");
enumCode.AppendLine($" /// {item.ValueCN}"); // 假设你有一个描述字段
enumCode.AppendLine($" /// </summary>");
// 每个枚举值生成
enumCode.AppendLine($" {item.Value.Trim().Replace(" ", "")} = {item.Code},");
}
enumCode.AppendLine("}");
// 返回生成的枚举代码
var enumStr = enumCode.ToString();
return ResponseOutput.Ok(enumStr);
}
/// <summary>
/// 添加bool
/// </summary>
@@ -25,10 +25,15 @@ namespace IRaCIS.Core.Application.Contracts
.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys)
.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
.WhereIf(inQuery.BusinessLevelEnum != null, t => t.BusinessLevelEnum == inQuery.BusinessLevelEnum)
.WhereIf(inQuery.CriterionTypeEnum != null, t => t.CriterionTypeEnum == inQuery.CriterionTypeEnum)
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
.WhereIf(inQuery.ToUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
.WhereIf(inQuery.CopyUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
.ProjectTo<EmailNoticeConfigView>(_mapper.ConfigurationProvider);
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
@@ -39,9 +44,10 @@ namespace IRaCIS.Core.Application.Contracts
{
var verifyExp1 = new EntityVerifyExp<EmailNoticeConfig>()
{
VerifyExp = t => t.BusinessScenarioEnum == addOrEditEmailNoticeConfig.BusinessScenarioEnum,
VerifyExp = t => t.BusinessScenarioEnum == addOrEditEmailNoticeConfig.BusinessScenarioEnum && t.CriterionTypeEnum== addOrEditEmailNoticeConfig.CriterionTypeEnum,
VerifyMsg = _localizer["EmailNoticeConfig_RepeatEmailScenario"]
};
// 匹配所有占位符的正则表达式,允许包含空格的占位符
File diff suppressed because it is too large Load Diff
@@ -28,6 +28,9 @@ namespace IRaCIS.Core.Application.Service
CreateMap<EmailNoticeConfig, EmailNoticeConfigView>()
.ForMember(t => t.EmailNoticeUserList, u => u.MapFrom(c => c.EmailNoticeUserTypeList));
CreateMap<EmailNoticeConfig, EmailNoticeConfigExportDto>();
CreateMap<Dictionary, DicView>()
.ForMember(t => t.ParentCode, u => u.MapFrom(c => c.Parent.Code));
CreateMap<SystemBasicData, SystemBasicDataView>();
@@ -73,6 +76,9 @@ namespace IRaCIS.Core.Application.Service
CreateMap<Internationalization, InternationalizationAddOrEdit>().ReverseMap();
CreateMap<InternationalizationAddOrEdit, IRCGlobalInfoDTO>();
CreateMap<Internationalization, BatchInternationalizationDto>().ReverseMap();
CreateMap<Internationalization, IRCGlobalInfoDTO>();
@@ -59,7 +59,7 @@ namespace IRaCIS.Application.Contracts
public string DepartmentOtherCN { get; set; } = String.Empty;
//增加的
public Guid? SpecialityId { get; set; } = Guid.Empty;
public Guid? SpecialityId { get; set; }
public string SpecialityOther { get; set; } = string.Empty;
public string SpecialityOtherCN { get; set; } = string.Empty;
public string Speciality { get; set; } = string.Empty;
@@ -174,6 +174,8 @@ namespace IRaCIS.Application.Contracts
public class SelectionReviewerDTO : DoctorDTO
{
public int DoctorTrialState { get; set; }
public bool IsEnroll { get; set; } = false;
public string OptUserName { get; set; } = string.Empty;
public DateTime? OptTime { get; set; }
public string? OptTimeStr => OptTime?.ToString("yyyy-MM-dd HH:mm:ss");
@@ -209,7 +211,7 @@ namespace IRaCIS.Application.Contracts
public string BlindName { get; set; }
public string BlindNameCN { get; set; } = string.Empty;
public Guid? SpecialityId { get; set; } = Guid.Empty;
public Guid? SpecialityId { get; set; }
public string SpecialityCN { get; set; } = string.Empty;
public string Speciality { get; set; } = string.Empty;
@@ -308,6 +310,8 @@ namespace IRaCIS.Application.Contracts
public string WeChat { get; set; } = String.Empty;
public int Nation { get; set; }
public string? BlindPublications { get; set; }
/// <summary>
/// 工作兼职
/// </summary>
@@ -324,7 +328,7 @@ namespace IRaCIS.Application.Contracts
public class SendEmailInDto
{
public string Email { get; set; }
public List<string> Email { get; set; }
public string Url { get; set; }
}
@@ -361,18 +365,26 @@ namespace IRaCIS.Application.Contracts
}
public class DeleteSummarizeInfoInDto
{
public Guid Id { get; set; }
}
public class GetSummarizeInfoInDto
{
public Guid DoctorId { get; set; }
public Guid? TrialId { get; set; }
public Guid? TrialId { get; set; } = null;
}
public class UpdateGneralSituationDto
public class SummarizeInfoDto
{
public Guid Id { get; set; }
public Guid? TrialId { get; set; }
public Guid? Id { get; set; }
/// <summary>
/// 医生Id
/// </summary>
public Guid DoctorId { get; set; }
/// <summary>
/// 概述
@@ -383,24 +395,70 @@ namespace IRaCIS.Application.Contracts
/// 概述
/// </summary>
public string SummarizeEn { get; set; } = string.Empty;
/// <summary>
/// 是否是主模板
/// </summary>
public bool IsMain { get; set; }
/// <summary>
/// 适应症
/// </summary>
public string Indication { get; set; } = string.Empty;
/// <summary>
/// 适应症
/// </summary>
public string IndicationEn { get; set; } = string.Empty;
/// <summary>
/// 项目Id
/// </summary>
public Guid? TrialId { get; set; }
public SaveSummarizeInfo SaveSummarizeInfoType { get; set; } = SaveSummarizeInfo.SaveSelf;
}
public enum SaveSummarizeInfo
{
/// <summary>
/// 保存自己
/// </summary>
SaveSelf = 0,
/// <summary>
/// 保存并覆盖
/// </summary>
SaveAndCover = 1,
/// <summary>
/// 保存并新增
/// </summary>
SaveAndAdd = 2,
}
public class UpdateGneralSituationDto
{
public List<SummarizeInfoDto> SummarizeList { get; set; }
}
public class BasicInfoAndEmploymentDto: DoctorBasicInfoCommand
{
//部门
public Guid? DepartmentId { get; set; } = Guid.Empty;
public Guid? DepartmentId { get; set; }
public string DepartmentOther { get; set; } = string.Empty;
public string DepartmentOtherCN { get; set; } = string.Empty;
//职称
public Guid? RankId { get; set; } = Guid.Empty;
public Guid? RankId { get; set; }
public string RankOther { get; set; } = string.Empty;
public string RankOtherCN { get; set; } = string.Empty;
//职位 主席 副主席
public Guid? PositionId { get; set; } = Guid.Empty;
public Guid? PositionId { get; set; }
public string PositionOther { get; set; } = string.Empty;
public string PositionOtherCN { get; set; } = string.Empty;
public Guid? HospitalId { get; set; } = Guid.Empty;
public Guid? HospitalId { get; set; }
public Guid? PhysicianId { get; set; }
public string Physician { get; set; } = string.Empty;
@@ -580,19 +638,19 @@ namespace IRaCIS.Application.Contracts
{
public Guid Id { get; set; }
//部门
public Guid? DepartmentId { get; set; } = Guid.Empty;
public Guid? DepartmentId { get; set; }
public string DepartmentOther { get; set; } = string.Empty;
public string DepartmentOtherCN { get; set; } = string.Empty;
//职称
public Guid? RankId { get; set; } = Guid.Empty;
public Guid? RankId { get; set; } = null;
public string RankOther { get; set; } = string.Empty;
public string RankOtherCN { get; set; } = string.Empty;
//职位 主席 副主席
public Guid? PositionId { get; set; } = Guid.Empty;
public Guid? PositionId { get; set; }
public string PositionOther { get; set; } = string.Empty;
public string PositionOtherCN { get; set; } = string.Empty;
public Guid? HospitalId { get; set; } = Guid.Empty;
public Guid? HospitalId { get; set; }
public Guid? PhysicianId { get; set; }
public string Physician { get; set; } = string.Empty;
@@ -735,7 +793,7 @@ namespace IRaCIS.Application.Contracts
public string SubspecialityOther { get; set; } = string.Empty;
public string SubspecialityOtherCN { get; set; } = string.Empty;
public Guid? SpecialityId { get; set; } = Guid.Empty;
public Guid? SpecialityId { get; set; }
public string SpecialityCN { get; set; } = string.Empty;
public string SpecialityOther { get; set; } = string.Empty;
public string SpecialityOtherCN { get; set; } = string.Empty;
@@ -31,8 +31,8 @@
{
public DateTime? CreateTime { get; set; }
public string BeginDateStr => BeginDate?.ToString("yyyy-MM");
public string EndDateStr => EndDate?.ToString("yyyy-MM");
public string BeginDateStr => BeginDate?.ToString("yyyy/MM");
public string EndDateStr => EndDate?.ToString("yyyy/MM");
}
public class PostgraduateCommand
@@ -81,9 +81,9 @@
{
public DateTime? CreateTime { get; set; }
public string BeginDateStr => BeginDate?.ToString("yyyy-MM");
public string BeginDateStr => BeginDate?.ToString("yyyy/MM");
public string EndDateStr => EndDate?.ToString("yyyy-MM");
public string EndDateStr => EndDate?.ToString("yyyy/MM");
}
public class DoctorEducationExperienceDTO
{
@@ -8,4 +8,15 @@
public DateTime EndDate { get; set; }
public int Status { get; set; } = 1;
}
public class GetIsVacationInDto
{
public Guid DoctorId { get; set; }
}
public class GetIsVacationOutDto
{
public bool IsVacation { get; set; }
}
}
@@ -31,6 +31,7 @@ namespace IRaCIS.Core.Application.Service
var query = _doctorRepository.AsQueryable()
.Where(x=>x.TrialId==null)
.WhereIf(inQuery.DepartmentId != null, t => t.DepartmentId == inQuery.DepartmentId)
.WhereIf(inQuery.SpecialityId != null, t => t.SpecialityId == inQuery.SpecialityId)
.WhereIf(inQuery.HospitalId != null, t => t.HospitalId == inQuery.HospitalId)
@@ -76,6 +77,7 @@ namespace IRaCIS.Core.Application.Service
var guidList = inQuery.ReadingTypeIdList.Concat(inQuery.SubspecialityIdList).Concat(inQuery.TitleIdList);
var query = _doctorRepository/*.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)*/
.Where(x=>x.TrialId==null)
.WhereIf(inQuery.DepartmentId != null, t => t.DepartmentId == inQuery.DepartmentId)
.WhereIf(inQuery.SpecialityId != null, t => t.SpecialityId == inQuery.SpecialityId)
@@ -102,6 +104,8 @@ namespace IRaCIS.Core.Application.Service
var doctorStateList = await _enrollDetailRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus == EnrollStatus.HasApplyDownloadResume)
.ProjectTo<DoctorStateModelDTO>(_mapper.ConfigurationProvider).ToListAsync();
var doctorEnrollList =await _enrollRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup)
.ToListAsync();
result.CurrentPageData.ToList().ForEach(doctor =>
{
//简历申请列表 --处理已经申请的
@@ -109,6 +113,7 @@ namespace IRaCIS.Core.Application.Service
if (doctorState != null)
{
doctor.DoctorTrialState = (int)EnrollStatus.HasApplyDownloadResume;
doctor.IsEnroll = doctorEnrollList.Any(x => x.DoctorId == doctor.Id);
doctor.OptTime = doctorState.OptTime;
doctor.OptUserName = doctorState.OptUserName;
}
@@ -1,9 +1,11 @@
using IRaCIS.Application.Contracts;
using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
using IRaCIS.Application.Contracts;
using IRaCIS.Application.Interfaces;
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Application.MassTransit.Consumer;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infrastructure;
using MassTransit;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using MimeKit;
@@ -13,7 +15,9 @@ namespace IRaCIS.Core.Application.Service
[ApiExplorerSettings(GroupName = "Reviewer")]
public class DoctorService(IRepository<Doctor> _doctorRepository,
IRepository<DoctorDictionary> _doctorDictionaryRepository,
IRepository<DoctorSummarize> _doctorSummarizeRepository,
IRepository<Enroll> _enrollRepository,
IRepository<Dictionary> _dictionaryRepository,
IRepository<Attachment> _attachmentRepository,
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
IRepository<DoctorCriterionFile> _doctorCriterionFileRepository,
@@ -69,6 +73,13 @@ namespace IRaCIS.Core.Application.Service
//插入中间表
basicInfoModel.TitleIds.ForEach(titleId => doctor.DoctorDicRelationList.Add(new DoctorDictionary() { DoctorId = doctor.Id, KeyName = StaticData.Title, DictionaryId = titleId }));
// 新增给默认值
doctor.CooperateStatus = ContractorStatusEnum.Noncooperation;
doctor.ReviewStatus = ReviewerInformationConfirmStatus.ConfirmRefuse;
doctor.AcceptingNewTrial = false;
doctor.ActivelyReading = false;
doctor.IsVirtual = false;
await _doctorRepository.AddAsync(doctor);
//_doctorRepository.Add(doctor);
@@ -218,41 +229,120 @@ namespace IRaCIS.Core.Application.Service
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<bool> UpdateGneralSituation(UpdateGneralSituationDto inDto)
public async Task<DoctorSummarize> AddOrUpdateGneralSituation(SummarizeInfoDto inDto)
{
if (inDto.TrialId != null)
if (inDto.TrialId != null&&inDto.Id==null)
{
await _doctorRepository.UpdatePartialFromQueryAsync(x => x.DoctorId == inDto.Id&&x.TrialId==inDto.TrialId.Value, x => new Doctor()
var systemCount = await _doctorSummarizeRepository.Where(x => x.DoctorId == inDto.DoctorId && x.TrialId == null).CountAsync();
if (systemCount == 0)
{
Summarize = inDto.Summarize,
SummarizeEn = inDto.SummarizeEn,
});
}
else
{
await _doctorRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new Doctor()
{
Summarize = inDto.Summarize,
SummarizeEn = inDto.SummarizeEn,
});
var trialinfo = await _trialRepository.Where(x => x.Id == inDto.TrialId).FirstNotNullAsync();
var dictionery = await _dictionaryRepository.Where(x => x.Parent.Code == "Indication" && x.Code == trialinfo.IndicationEnum.ToString()).FirstNotNullAsync();
inDto.IndicationEn = dictionery.Value;
inDto.Indication = dictionery.ValueCN;
var system= inDto.Clone();
system.TrialId = null;
system.IsMain = true;
await _doctorSummarizeRepository.InsertOrUpdateAsync(system, true);
}
}
if (inDto.TrialId == null)
{
var systemCount = await _doctorSummarizeRepository.Where(x => x.DoctorId == inDto.DoctorId && x.TrialId == null).CountAsync();
if (systemCount == 0)
{
inDto.IsMain = true;
}
if (inDto.Indication.IsNullOrEmpty() && inDto.IndicationEn.IsNullOrEmpty())
{
inDto.Indication = "默认";
inDto.IndicationEn = "Default";
}
var exists = await _doctorSummarizeRepository
.Where( x => x.IndicationEn == inDto.IndicationEn|| x.Indication == inDto.Indication)
.AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null&&x.Id!=inDto.Id);
if (exists)
{
throw new BusinessValidationFailedException(_localizer["DoctorSummarize_repeat"]);
}
}
if (inDto.TrialId != null && inDto.SaveSummarizeInfoType!= SaveSummarizeInfo.SaveSelf)
{
switch (inDto.SaveSummarizeInfoType)
{
case SaveSummarizeInfo.SaveAndCover:
await _doctorSummarizeRepository.BatchUpdateNoTrackingAsync(x =>
x.DoctorId == inDto.DoctorId && x.TrialId == null &&
x.IndicationEn == inDto.IndicationEn && x.Indication == inDto.Indication, x => new DoctorSummarize()
{
Summarize = inDto.Summarize,
SummarizeEn = inDto.SummarizeEn
});
break;
case SaveSummarizeInfo.SaveAndAdd:
var exists = await _doctorSummarizeRepository
.WhereIf(_userInfo.IsEn_Us, x => x.IndicationEn == inDto.IndicationEn)
.WhereIf(!_userInfo.IsEn_Us, x => x.Indication == inDto.Indication)
.AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null);
if (exists)
{
throw new BusinessValidationFailedException(_localizer["DoctorSummarize_repeat"]);
}
await _doctorSummarizeRepository.BatchDeleteNoTrackingAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == inDto.TrialId);
var needData = inDto.Clone();
needData.TrialId = null;
await _doctorSummarizeRepository.InsertOrUpdateAsync(needData, true);
break;
}
}
if (inDto.TrialId == null && inDto.IsMain)
{
await _doctorSummarizeRepository.BatchUpdateNoTrackingAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null,
x => new DoctorSummarize()
{
IsMain = false
});
}
var success= await _doctorRepository.SaveChangesAsync();
return success;
var entity = await _doctorSummarizeRepository.InsertOrUpdateAsync(inDto, true);
return entity;
}
/// <summary>
/// 删除概述
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<bool> DeleteSummarizeInfo(DeleteSummarizeInfoInDto inDto)
{
var result = await _doctorSummarizeRepository.DeleteFromQueryAsync(x=>x.Id==inDto.Id);
return await _doctorSummarizeRepository.SaveChangesAsync();
}
/// <summary>
/// 获取概述
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public async Task<UpdateGneralSituationDto?> GetSummarizeInfo(GetSummarizeInfoInDto inDto)
[HttpPost]
public async Task<UpdateGneralSituationDto> GetSummarizeInfo(GetSummarizeInfoInDto inDto)
{
var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == inDto.DoctorId)
.ProjectTo<UpdateGneralSituationDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
if (inDto.TrialId != null)
{
var doctorInfo = await trialExperienceService.GetTrialDoctorInfo(new GetTrialDoctorInfoInDto()
@@ -261,15 +351,12 @@ namespace IRaCIS.Core.Application.Service
DoctorId = inDto.DoctorId,
});
doctorBasicInfo = new UpdateGneralSituationDto()
{
Summarize = doctorInfo.Summarize,
SummarizeEn = doctorInfo.SummarizeEn,
};
}
return doctorBasicInfo;
var result = await _doctorSummarizeRepository.Where(t => t.DoctorId == inDto.DoctorId && t.TrialId == inDto.TrialId)
.ProjectTo<SummarizeInfoDto>(_mapper.ConfigurationProvider).ToListAsync();
return new UpdateGneralSituationDto() {
SummarizeList= result
};
}
/// <summary>
@@ -283,7 +370,12 @@ namespace IRaCIS.Core.Application.Service
var messageToSend = new MimeMessage();
//发件地址
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
messageToSend.To.Add(new MailboxAddress(String.Empty, inDto.Email));
foreach (var item in inDto.Email)
{
messageToSend.To.Add(new MailboxAddress(String.Empty, item));
}
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
@@ -21,7 +21,7 @@ namespace IRaCIS.Core.Application.Service
.OrderBy(t => t.CreateTime).ProjectTo<EducationInfoViewModel>(_mapper.ConfigurationProvider).ToListAsync();
var postgraduateList = await _postgraduateRepository.Where(o => o.DoctorId == doctorId)
.OrderBy(t => t.CreateTime).ProjectTo<PostgraduateViewModel>(_mapper.ConfigurationProvider).ToListAsync();
.OrderBy(t => t.CreateTime).ProjectTo<PostgraduateViewModel>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }).ToListAsync();
return new DoctorEducationExperienceDTO()
@@ -1,5 +1,6 @@
using IRaCIS.Application.Contracts;
using IRaCIS.Application.Interfaces;
using MassTransit;
using Microsoft.AspNetCore.Mvc;
namespace IRaCIS.Core.Application.Service
@@ -7,6 +8,7 @@ namespace IRaCIS.Core.Application.Service
[ApiExplorerSettings(GroupName = "Reviewer")]
public class TrialExperienceService(IRepository<TrialExperience> _trialExperienceRepository,
IRepository<Doctor> _doctorRepository,
IRepository<DoctorSummarize> _doctorSummarizeRepository,
IRepository<TrialExperienceCriteria> _trialExperienceCriteriaRepository,
IRepository<Attachment> _attachmentRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialExperienceService
{
@@ -84,11 +86,59 @@ namespace IRaCIS.Core.Application.Service
TrialId = inDto.TrialId,
OtherClinicalExperience = systemInfoDcotor.OtherClinicalExperience,
OtherClinicalExperienceCN = systemInfoDcotor.OtherClinicalExperienceCN,
Summarize = systemInfoDcotor.Summarize,
SummarizeEn = systemInfoDcotor.SummarizeEn,
};
#region
///没有就加
var summarizeCount = await _doctorSummarizeRepository.Where(x => x.DoctorId == inDto.DoctorId && x.TrialId == inDto.TrialId).CountAsync();
if (summarizeCount == 0)
{
var main = await _doctorSummarizeRepository.Where(x => x.DoctorId == inDto.DoctorId && x.IsMain && x.TrialId == null).ProjectTo<SummarizeInfoDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
if (main != null)
{
main.Id = null;
main.TrialId = inDto.TrialId;
main.IsMain = false;
var entity = await _doctorSummarizeRepository.InsertOrUpdateAsync(main, true);
}
}
doctorInfo = await _doctorRepository.AddAsync(doctor, true);
#endregion
#region
var trialExperienceList = await _trialExperienceRepository.Where(o => o.DoctorId == inDto.DoctorId)
.Where(x=>x.TrialId==null||x.TrialId!=inDto.TrialId)
.Where(x => x.ExperienceDataType == ExperienceDataType.System || x.ExperienceDataType == ExperienceDataType.SystemAuto).Include(x => x.ExperienceCriteriaList).ToListAsync();
List<TrialExperienceCriteria> criteriaList = new List<TrialExperienceCriteria>();
foreach (var item in trialExperienceList)
{
item.Trial = null;
item.TrialId = inDto.TrialId;
item.ExperienceDataType = ExperienceDataType.Trial;
item.Id = NewId.NextGuid();
item.ExperienceCriteriaList.ForEach(x => {
criteriaList.Add(new TrialExperienceCriteria()
{
DoctorId = item.DoctorId,
EvaluationCriteriaId = x.EvaluationCriteriaId,
TrialExperienceId = item.Id
});
});
item.ExperienceCriteriaList = new List<TrialExperienceCriteria>();
}
await _trialExperienceCriteriaRepository.AddRangeAsync(criteriaList);
await _trialExperienceRepository.AddRangeAsync(trialExperienceList);
await _trialExperienceRepository.SaveChangesAsync();
#endregion
}
return doctorInfo;
@@ -107,25 +157,20 @@ namespace IRaCIS.Core.Application.Service
}
else
{
// 当前项目没有则复制
if (!(await _trialExperienceRepository.AnyAsync(x => x.TrialId == inDto.TrialId)))
// 先添加
await GetTrialDoctorInfo(new GetTrialDoctorInfoInDto()
{
var trialExperienceList = await _trialExperienceRepository.Where(o => o.DoctorId == inDto.DoctorId)
.Where(x => x.ExperienceDataType == ExperienceDataType.System || x.ExperienceDataType == ExperienceDataType.SystemAuto).ToListAsync();
foreach (var item in trialExperienceList)
{
item.Trial = null;
item.TrialId = inDto.TrialId;
item.ExperienceDataType = ExperienceDataType.Trial;
}
}
DoctorId = inDto.DoctorId,
TrialId = inDto.TrialId.Value,
});
var doctorClinicalTrialExperienceList = await _trialExperienceRepository
.Where(o => o.DoctorId == inDto.DoctorId)
.Where(x => x.ExperienceDataType == ExperienceDataType.Trial|| x.ExperienceDataType == ExperienceDataType.TrialAuto)
.Where(x => x.TrialId == inDto.TrialId.Value)
.OrderBy(t => t.CreateTime)
.ProjectTo<TrialExperienceListDTO>(_mapper.ConfigurationProvider).ToListAsync();
return doctorClinicalTrialExperienceList;
}
@@ -242,7 +287,7 @@ namespace IRaCIS.Core.Application.Service
if (inDto.TrialId != null)
{
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == inDto.DoctorId&&o.TrialId==inDto.TrialId.Value, u => new Doctor()
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.DoctorId == inDto.DoctorId&&o.TrialId==inDto.TrialId.Value, u => new Doctor()
{
OtherClinicalExperience = inDto.OtherClinicalExperience ?? string.Empty,
OtherClinicalExperienceCN = inDto.OtherClinicalExperienceCN ?? string.Empty
@@ -70,6 +70,36 @@ namespace IRaCIS.Core.Application.Service
}
/// <summary>
/// 获取是否休假
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<GetIsVacationOutDto> GetIsVacation(GetIsVacationInDto inDto)
{
var query = await _vacationRepository.Where(u => u.DoctorId == inDto.DoctorId).ToListAsync();
bool isVacation = false;
var now = DateTime.Now;
foreach (var item in query)
{
if (item.StartDate <= now && now <= item.EndDate)
{
isVacation = true;
break;
}
}
return new GetIsVacationOutDto() {
IsVacation= isVacation
};
}
[NonDynamicMethod]
public async Task<IResponseOutput> OnVacation(Guid doctorId)
{
@@ -11,6 +11,7 @@ namespace IRaCIS.Core.Application.Service
{
public DoctorConfig()
{
var isEn_Us = false;
// 从 DateTime 映射到 DateOnly
CreateMap<DateTime, DateOnly>().ConvertUsing(dt => DateOnly.FromDateTime(dt));
@@ -57,11 +58,18 @@ namespace IRaCIS.Core.Application.Service
CreateMap<AddDoctorCriterionFileDto, DoctorCriterionFile>();
CreateMap<DoctorCriterionFile, GetDoctorCriterionFileOutDto>();
CreateMap<Doctor, DoctorBasicInfoCommand>();
CreateMap<Doctor, BasicInfoAndEmploymentDto>();
CreateMap<BasicInfoAndEmploymentDto, Doctor>().ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null)); ;
CreateMap<Education, EducationInfoViewModel>();
CreateMap<Vacation, VacationCommand>();
CreateMap<ResearchPublication, ResearchPublicationDTO>();
CreateMap<Postgraduate, PostgraduateViewModel>();
CreateMap<Postgraduate, PostgraduateViewModel>()
.ForMember(t => t.Hospital, c => c.MapFrom(d => d.HospitalEnt.HospitalName))
.ForMember(t => t.HospitalCN, c => c.MapFrom(d => d.HospitalEnt.HospitalNameCN));
CreateMap<Attachment, AttachmentDTO>();
CreateMap<Doctor, ResumeConfirmDTO>();
@@ -70,6 +78,9 @@ namespace IRaCIS.Core.Application.Service
CreateMap<Doctor, PaymentModeDto>();
CreateMap<DoctorSummarize, SummarizeInfoDto>();
CreateMap<SummarizeInfoDto, DoctorSummarize>();
CreateMap<PaymentModeDto, Doctor>();
CreateMap<Doctor, TrialExperienceModel>();
@@ -108,6 +108,16 @@ namespace IRaCIS.Core.Application.ViewModel
public string SortField { get; set; } = string.Empty;
public bool Asc { get; set; }
public bool? IsEnable { get; set; }
public int? EmailUrgentEnum { get; set; }
public UserTypeEnum? ToUserType { get; set; }
public UserTypeEnum? CopyUserType { get; set; }
public BusinessModule? BusinessModuleEnum { get; set; }
}
@@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.Interfaces
{
Task<List<TrialEmailNoticeConfigView>> GetTrialEmailNoticeConfigList(TrialEmailNoticeConfigQuery inQuery);
Task<IResponseOutput<List<TrialEmailNoticeConfigView>>> GetTrialEmailNoticeConfigList(TrialEmailNoticeConfigQuery inQuery);
Task<IResponseOutput> AddOrUpdateTrialEmailNoticeConfig(TrialEmailNoticeConfigAddOrEdit addOrEditTrialEmailNoticeConfig);
@@ -1242,19 +1242,51 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<PageOutput<TrialSelectEmailNoticeConfigView>> GetSysEmailNoticeConfigList(EmailNoticeConfigQuery inQuery)
{
var emailNoticeConfigQueryable = _emailNoticeConfigRepository
.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys || t.SystemLevel == SysEmailLevel.sys_Config_role)
//.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
var trialConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new { t.IsEnrollementQualificationConfirm, t.IsPDProgressView }).First();
var emailNoticeConfigQueryable = _emailNoticeConfigRepository.Where(t => t.BusinessLevelEnum == BusinessLevel.Trial)
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
.WhereIf(inQuery.ToUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
.WhereIf(inQuery.CopyUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
.WhereIf(trialConfig.IsEnrollementQualificationConfirm == false, t => t.BusinessModuleEnum != BusinessModule.EligibilityVerification)
.WhereIf(trialConfig.IsPDProgressView == false, t => t.BusinessModuleEnum != BusinessModule.PDVerification)
.WhereIf(trialConfig.IsPDProgressView == false && trialConfig.IsEnrollementQualificationConfirm == false, t => t.BusinessModuleEnum != BusinessModule.PDVerification
&& t.BusinessModuleEnum != BusinessModule.EligibilityVerification)
.ProjectTo<TrialSelectEmailNoticeConfigView>(_mapper.ConfigurationProvider, new { trialId = inQuery.TrialId });
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
}
public async Task<IResponseOutput> BatchAddEnrollOrPdEmailConfig(Guid trialId)
{
var trialConfig = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.IsEnrollementQualificationConfirm, t.IsPDProgressView }).First();
var emailNoticeConfigQueryable = _emailNoticeConfigRepository
.WhereIf(trialConfig.IsEnrollementQualificationConfirm == true && trialConfig.IsPDProgressView == false, t => t.BusinessModuleEnum == BusinessModule.EligibilityVerification || t.BusinessModuleEnum == BusinessModule.Eligibility_PDVerification)
.WhereIf(trialConfig.IsEnrollementQualificationConfirm == false && trialConfig.IsPDProgressView == true, t => t.BusinessModuleEnum == BusinessModule.PDVerification || t.BusinessModuleEnum == BusinessModule.Eligibility_PDVerification)
.WhereIf(trialConfig.IsPDProgressView == true && trialConfig.IsEnrollementQualificationConfirm == true, t => t.BusinessModuleEnum == BusinessModule.PDVerification
|| t.BusinessModuleEnum == BusinessModule.EligibilityVerification || t.BusinessModuleEnum == BusinessModule.Eligibility_PDVerification)
.ProjectTo<TrialSelectEmailNoticeConfigView>(_mapper.ConfigurationProvider, new { trialId = trialId });
var list = await emailNoticeConfigQueryable.ToListAsync();
var addList = _mapper.Map<List<BatchAddTrialEmailNoticeConfig>>(list.Where(t => t.IsHaveSelected == false).ToList());
foreach (var item in addList)
{
item.TrialId = trialId;
}
return await BatchAddSysEmailConfig(addList);
}
/// <summary>
/// 批量勾选 传递列表每行数据,后台进行处理转换,建立关联关系
/// </summary>
@@ -1262,6 +1294,10 @@ namespace IRaCIS.Core.Application.Service
/// <returns></returns>
public async Task<IResponseOutput> BatchAddSysEmailConfig(List<BatchAddTrialEmailNoticeConfig> batchAddList)
{
if (!batchAddList.Any())
{
return ResponseOutput.Ok();
}
var first = batchAddList.First();
var trialId = first.TrialId;
@@ -1312,31 +1348,56 @@ namespace IRaCIS.Core.Application.Service
await _trialEmailNoticeConfigRepository.SaveChangesAsync();
//处理定时任务
var taskInfoList = await _trialEmailNoticeConfigRepository.Where(t => t.TrialId== trialId && t.EmailCron != string.Empty && t.IsAutoSend)
.Select(t => new { t.Id, t.Code, TrialCode = t.Trial.TrialCode, t.EmailCron, t.BusinessScenarioEnum, t.TrialId })
.ToListAsync();
foreach (var task in taskInfoList)
{
//利用主键作为任务Id
var jobId = $"{task.TrialId}({task.TrialCode})_({task.BusinessScenarioEnum})";
HangfireJobHelper.AddOrUpdateTrialCronJob(jobId, trialId, task.BusinessScenarioEnum, task.EmailCron);
}
return ResponseOutput.Ok();
}
[HttpPost]
public async Task<List<TrialEmailNoticeConfigView>> GetTrialEmailNoticeConfigList(TrialEmailNoticeConfigQuery inQuery)
public async Task<IResponseOutput<List<TrialEmailNoticeConfigView>>> GetTrialEmailNoticeConfigList(TrialEmailNoticeConfigQuery inQuery)
{
//await SyncSystemEmainCofigDocListAsync(inQuery.TrialId);
var trialConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new { t.IsEnrollementQualificationConfirm, t.IsPDProgressView }).First();
var trialEmailNoticeConfigQueryable = _trialEmailNoticeConfigRepository.Where(t => t.TrialId == inQuery.TrialId)
.WhereIf(inQuery.IsDistinguishCriteria == false, t => t.TrialReadingCriterionId == null)
.WhereIf(inQuery.IsDistinguishCriteria == true, t => t.CriterionTypeEnum != null)
.WhereIf(inQuery.IsDistinguishCriteria == true, t => t.CriterionTypeEnum != null)
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
.WhereIf(inQuery.ToUserType != null, t => t.TrialEmailNoticeUserList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
.WhereIf(inQuery.CopyUserType != null, t => t.TrialEmailNoticeUserList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
.ProjectTo<TrialEmailNoticeConfigView>(_mapper.ConfigurationProvider);
var sortField = string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TrialEmailNoticeConfigView.Code) : inQuery.SortField;
var orderQuery = inQuery.Asc ? trialEmailNoticeConfigQueryable.OrderBy(sortField) : trialEmailNoticeConfigQueryable.OrderBy(sortField + " desc");
return await orderQuery.ToListAsync();
var list = await orderQuery.ToListAsync();
return ResponseOutput.Ok(list, trialConfig);
}
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
public async Task<IResponseOutput> AddOrUpdateTrialEmailNoticeConfig(TrialEmailNoticeConfigAddOrEdit addOrEditTrialEmailNoticeConfig)
{
await TestEmailConfigAsync(addOrEditTrialEmailNoticeConfig);
@@ -1405,7 +1466,12 @@ namespace IRaCIS.Core.Application.Service
await _trialEmailNoticeConfigRepository.SaveChangesAsync();
var jobId = $"{addOrEditTrialEmailNoticeConfig.TrialId}_{id}";
var cronInfo = await _trialEmailNoticeConfigRepository.Where(t => t.Id == addOrEditTrialEmailNoticeConfig.Id)
.Select(t => new { t.Id, t.Code, TrialCode = t.Trial.TrialCode, t.EmailCron, t.BusinessScenarioEnum, t.TrialId })
.FirstAsync();
var jobId = $"{cronInfo.TrialId}({cronInfo.TrialCode})_({cronInfo.BusinessScenarioEnum})";
if (addOrEditTrialEmailNoticeConfig.IsAutoSend)
{
@@ -1523,12 +1589,16 @@ namespace IRaCIS.Core.Application.Service
}
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
[HttpDelete("{trialEmailNoticeConfigId:guid}")]
public async Task<IResponseOutput> DeleteTrialEmailNoticeConfig(Guid trialEmailNoticeConfigId)
{
var trialId = await _trialEmailNoticeConfigRepository.Where(t => t.Id == trialEmailNoticeConfigId).Select(t => t.TrialId).FirstOrDefaultAsync();
var jobId = $"{trialId}_{trialEmailNoticeConfigId}";
var cronInfo = await _trialEmailNoticeConfigRepository.Where(t => t.Id == trialEmailNoticeConfigId)
.Select(t => new { t.Id, t.Code, TrialCode = t.Trial.TrialCode, t.EmailCron, t.BusinessScenarioEnum, t.TrialId })
.FirstAsync();
var jobId = $"{cronInfo.TrialId}({cronInfo.TrialCode})_({cronInfo.BusinessScenarioEnum})";
HangfireJobHelper.RemoveCronJob(jobId);
@@ -53,7 +53,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<BatchAddTrialEmailNoticeConfig, TrialEmailNoticeConfig>();
CreateMap<TrialSelectEmailNoticeConfigView, BatchAddTrialEmailNoticeConfig > ();
CreateMap<AddOrEditTrialDocument, TrialDocument>()
@@ -325,7 +325,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
if (findStudy.SubejectCode == inCommand.SubjectCode && findStudy.SubjectId == inCommand.SubjectId)
{
//上传给后处理其他访视了
if (inCommand.VisitTaskId != null && findStudy.VisitTaskId != null && findStudy.VisitTaskId != inCommand.VisitTaskId)
if (inCommand.VisitTaskId != null && findStudy.VisitTaskId != null && findStudy.VisitTaskId != inCommand.VisitTaskId && findStudy.SubjectVisitId != currentUploadSubjectVisitId)
{
result.Add(new TaskStudyArchiveConfirmResult() { StudyInstanceUid = studyUid, IsAllowReUpload = false, IsAllowUpload = false });
}
@@ -135,7 +135,7 @@ namespace IRaCIS.Application.Contracts
public string LastName { get; set; } = string.Empty;
public int? Sex { get; set; } // 1-男 2-女
public int Status { get; set; } = 1; // 0-已删除 1-正常
public UserStateEnum Status { get; set; } = UserStateEnum.Enable;
public string Phone { get; set; } = string.Empty;
public string EMail { get; set; } = string.Empty;
@@ -287,6 +287,10 @@ namespace IRaCIS.Core.Application.Service
IsFirstAdd = true
});
var userName = _userRepository.Where(t => t.Id == userId).Select(t => t.UserName).FirstOrDefault();
await _fusionCache.RemoveAsync(CacheKeys.UserLoginError(userName));
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = userId, OptType = UserOptType.ResetPassword }, true);
return ResponseOutput.Ok();
@@ -554,6 +558,13 @@ namespace IRaCIS.Core.Application.Service
if (user == null) return Null404NotFound(user);
if (user.Status!=model.Status)
{
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = model.Status == UserStateEnum.Enable ? UserOptType.AccountEnable : UserOptType.AccountLocked }, true);
}
_mapper.Map(model, user);
if (user.IsZhiZhun)
@@ -561,7 +572,9 @@ namespace IRaCIS.Core.Application.Service
user.OrganizationName = _userInfo.IsEn_Us ? _systemEmailConfig.OrganizationName : _systemEmailConfig.OrganizationNameCN;
}
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = UserOptType.UpdateUser }, true);
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = UserOptType.UpdateUser });
var success = await _userRepository.SaveChangesAsync();
@@ -692,12 +705,11 @@ namespace IRaCIS.Core.Application.Service
public async Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password)
{
const string cachePrefix = "login-failures:";
int maxFailures = _verifyConfig.CurrentValue.LoginMaxFailCount;
int lockoutMinutes = _verifyConfig.CurrentValue.LoginFailLockMinutes;
// 生成缓存键
string cacheKey = $"{cachePrefix}{userName}";
string cacheKey = CacheKeys.UserLoginError(userName);
// 从缓存中获取登录失败次数
int? failCount = await _fusionCache.GetOrDefaultAsync<int?>(cacheKey);
@@ -799,7 +811,7 @@ namespace IRaCIS.Core.Application.Service
DateTime? trialCreateTime = inQuery.TrialId != null ? _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.CreateTime).FirstOrDefault() : null;
var userLogQueryable =
_userLogRepository
_userLogRepository.AsQueryable().IgnoreQueryFilters()
.WhereIf(inQuery.TrialId != null, t => t.LoginUser.UserTrials.Any(c => c.TrialId == inQuery.TrialId && (c.UserId == t.LoginUserId || c.UserId == t.OptUserId)))
.WhereIf(trialCreateTime != null, t => t.CreateTime >= trialCreateTime)
.WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType)
@@ -0,0 +1,46 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Application.Service.DTO;
public class TemplateTable
{
public string TableName { get; set; }
public string Comment { get; set; }
public List<TemplateTableProperty> AddOrEditPropertyList => TablePropertyList.Where(t => !AddOrUpdateExcludeNameList.Contains(t.PropertyName)).ToList();
[JsonIgnore]
public List<TemplateTableProperty> TablePropertyList { get; set; }
[JsonIgnore]
public List<string> AddOrUpdateExcludeNameList = new List<string>() { "CreateUserId", "UpdateUserId", "CreateTime", "UpdateTime", "DeleteUserId", "IsDeleted", "DeletedTime" };
}
public class TemplateTableProperty
{
public string ColumnName { get; set; }
public string PropertyName { get; set; }
public string CSharpType { get; set; }
public bool IsNullable { get; set; }
public int? MaxLength { get; set; }
public bool IsPrimarykey { get; set; }
public string Comment { get; set; }
}
@@ -0,0 +1,119 @@
using DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Service.DTO;
using Microsoft.AspNetCore.Builder;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.Extensions.Configuration;
using NPOI.HPSF;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Application.Service
{
public class CodeTemplateService(IRepository<Dictionary> _dicRepository,IMapper _mapper, IConfiguration _configuration) : ServiceBase
{
static string GetCSharpType(Type type)
{
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
{
var underlyingType = Nullable.GetUnderlyingType(type);
return $"{GetCSharpType(underlyingType)}?";
}
return type switch
{
_ when type == typeof(int) => "int",
_ when type == typeof(long) => "long",
_ when type == typeof(short) => "short",
_ when type == typeof(byte) => "byte",
_ when type == typeof(bool) => "bool",
_ when type == typeof(decimal) => "decimal",
_ when type == typeof(double) => "double",
_ when type == typeof(float) => "float",
_ when type == typeof(Guid) => "Guid",
_ when type == typeof(DateTime) => "DateTime",
_ when type == typeof(string) => "string",
_ => type.Name // 非常见类型,返回 .NET 类型名称
};
}
/// <summary>
/// 获取数据库的表信息 以及字段信息
/// </summary>
/// <param name="tableName"></param>
/// <param name="comment"></param>
/// <returns></returns>
public List<TemplateTable> GetDataBaseTableList(string tableName, string comment)
{
var contextOptions = new DbContextOptionsBuilder<IRaCISDBContext>().UseSqlServer(_configuration.GetSection("ConnectionStrings:RemoteNew").Value).Options;
using var dbContext = new IRaCISDBContext(contextOptions);
var dbModel = dbContext.Model;
var list = dbModel.GetEntityTypes().Where(t => t.GetTableName().IsNotNullOrEmpty())
.WhereIf(tableName.IsNotNullOrEmpty(), t => t.GetTableName()!.Contains(tableName))
.WhereIf(comment.IsNotNullOrEmpty(), t => t.GetComment().Contains(comment))
.Select(t => new TemplateTable()
{
TableName = t.GetTableName()!,
TablePropertyList = t.GetProperties().Select(property => new TemplateTableProperty()
{
PropertyName = property.Name,
ColumnName = property.GetColumnName(),
IsNullable = property.IsNullable,
IsPrimarykey = property.IsKey(),
CSharpType = GetCSharpType(property.ClrType),
Comment = property.GetComment() ?? string.Empty
}).ToList()
}).ToList();
return list;
}
/// <summary>
/// 根据字典名 code 生成枚举定义
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
public async Task<IResponseOutput> GenerateEnumDefine(string code)
{
var searchList = await _dicRepository.Where(t => t.Parent.Code == code && t.ParentId != null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
// StringBuilder 用于构建枚举代码字符串
var enumCode = new StringBuilder();
// 生成枚举定义
enumCode.AppendLine($"public enum {code}");
enumCode.AppendLine("{");
foreach (var item in searchList)
{
// 添加 XML 注释作为枚举描述
enumCode.AppendLine($" /// <summary>");
enumCode.AppendLine($" /// {item.ValueCN}"); // 假设你有一个描述字段
enumCode.AppendLine($" /// </summary>");
// 每个枚举值生成
enumCode.AppendLine($" {item.Value.Trim().Replace(" ", "")} = {item.Code},");
}
enumCode.AppendLine("}");
// 返回生成的枚举代码
var enumStr = enumCode.ToString();
return ResponseOutput.Ok(enumStr);
}
}
}
@@ -0,0 +1,101 @@
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Infrastructure.Encryption;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Application.Service;
public class HIRActivateService : ServiceBase
{
/// <summary>
/// 获取授权码明文信息
/// </summary>
/// <param name="authorizationCode"></param>
/// <param name="_hospitalOption"></param>
/// <returns></returns>
[AllowAnonymous]
public async Task<IResponseOutput> GetAuthorizationCodeInfo(string authorizationCode, [FromServices] IOptionsMonitor<SystemHospitalOption> _hospitalOption)
{
// 解密 Base64 编码后的数据
byte[] base64DecodedBytes = Convert.FromBase64String(authorizationCode);
string decodedText = System.Text.Encoding.UTF8.GetString(base64DecodedBytes);
var authInfo = JsonConvert.DeserializeObject<TrialAuthorizationInfo>(decodedText);
if (authInfo == null)
{
return ResponseOutput.NotOk("不能解析该项目授权码");
}
return ResponseOutput.Ok(decodedText);
}
/// <summary>
/// 获取项目激活码
/// </summary>
/// <param name="_basicSystemConfigConfig"></param>
/// <returns></returns>
[AllowAnonymous]
[RoutePattern(HttpMethod = "get")]
public async Task<IResponseOutput> GetTrialActivationCode(TrialAuthorizationInfo authorizationInfo, [FromServices] IOptionsMonitor<ServiceVerifyConfigOption> _basicSystemConfigConfig)
{
if (authorizationInfo != null)
{
//一周内激活
authorizationInfo.ActiveDeadLineDate = DateTime.Now.Date.AddDays(8).AddSeconds(-1);
var info = AesEncryption.Encrypt($"{JsonConvert.SerializeObject(authorizationInfo)}", "HIR_System_AES_Key_Info", "Trial_AuthorizationEncrypt");
Console.WriteLine("HIR_System_AES_Key_Info".PadRight(32, '0').Substring(0, 32) + " " + "Trial_AuthorizationEncrypt".PadRight(16, '0').Substring(0, 16));
//var dd = AesEncryption.Decrypt(info, "HIR_System_AES_Key_Info", "Trial_AuthorizationEncrypt");
return ResponseOutput.Ok(info);
}
else
{
return ResponseOutput.NotOk("激活码解密文本信息有误");
}
}
}
public class TrialAuthorizationInfo
{
public Guid TrialId { get; set; }
public Guid CreateUserId { get; set; }
public string TrialCode { get; set; }
public string HospitalName { get; set; }
public string HospitalCode { get; set; }
public int PurchaseDuration { get; set; }
public List<CriterionType> CriterionTypeList { get; set; }
public DateTime? AuthorizationDeadLineDate { get; set; }
public DateTime? ActiveDeadLineDate { get; set; }
public DateTime? ActiveTime { get; set; }
}
@@ -1,7 +1,7 @@
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
using System.Text.Json.Serialization;
namespace IRaCIS.Core.API.OAuth;
namespace IRaCIS.Core.Application.Service.OAuth;
@@ -1,6 +1,7 @@
using System.Text.Json.Serialization;
using Newtonsoft.Json;
using System.Text.Json.Serialization;
namespace IRaCIS.Core.API.OAuth;
namespace IRaCIS.Core.Application.Service.OAuth;
public class LogtoTokenResponse
{
@@ -8,30 +9,35 @@ public class LogtoTokenResponse
/// The access token issued by the Logto authorization server.
/// </summary>
[JsonPropertyName("access_token")]
[JsonProperty("access_token")]
public string AccessToken { get; set; } = null!;
/// <summary>
/// The type of the token issued by the Logto authorization server.
/// </summary>
[JsonPropertyName("token_type")]
[JsonProperty("token_type")]
public string TokenType { get; set; } = null!;
/// <summary>
/// The lifetime in seconds of the access token.
/// </summary>
[JsonPropertyName("expires_in")]
[JsonProperty("expires_in")]
public int ExpiresIn { get; set; }
/// <summary>
/// The refresh token, which can be used to obtain new access tokens using the same authorization grant.
/// </summary>
[JsonPropertyName("refresh_token")]
[JsonProperty("refresh_token")]
public string? RefreshToken { get; set; } = null!;
/// <summary>
/// The ID token, which can be used to verify the identity of the user.
/// </summary>
[JsonPropertyName("id_token")]
[JsonProperty("id_token")]
public string? IdToken { get; set; } = null;
}
@@ -1,7 +1,7 @@
using Org.BouncyCastle.Tls;
using System.Collections.Generic;
namespace IRaCIS.Core.API.OAuth;
namespace IRaCIS.Core.Application.Service.OAuth;
public class LogtoUser
{
@@ -0,0 +1,573 @@
using Azure.Core;
using IdentityModel;
using IdentityModel.Client;
using IRaCIS.Core.Application.Service.OAuth;
using MassTransit;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Utilities.Net;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
namespace IRaCIS.Core.Application.Service
{
public class OAuthService : ServiceBase
{
#region authorization_code PKCE
public IResponseOutput TestPCKEOrgin()
{
// 1. 生成 code_verifier 和 code_challenge
string codeVerifier = "QMSBBxTQrpKPscvNNfmaQfmyk5Wd33GZS1FKSo3Shv8w-59vW1iTSlgAznYojkYv2DgR4XhTqySsBnDPq0";
string codeChallenge = PkceUtil.GenerateCodeChallenge(codeVerifier);
Console.WriteLine(codeVerifier);
string clientId = "aj34vqrpvz8olsbxwtcog";
string redirectUri = "http://localhost:6100/OAuth/TestPKCECallBack";
string state = "123456";
// 构造请求的 URL
string authorizationUrl = $"https://logto.test.extimaging.com/oidc/auth" +
$"?client_id={clientId}" +
$"&redirect_uri={Uri.EscapeDataString(redirectUri)}" +
$"&response_type=code" +
$"&scope=openid profile email phone" +
$"&code_challenge={codeChallenge}" +
$"&code_challenge_method=S256" +
$"&state={state}";
Console.WriteLine("请将以下 URL 复制到浏览器中,完成登录后获取 code:");
Console.WriteLine(authorizationUrl);
return ResponseOutput.Ok();
}
[AllowAnonymous]
[RoutePattern(HttpMethod = "Get")]
public async Task<IResponseOutput> TestPKCECallBackAsync(string code)
{
var httpClient = new HttpClient();
var disco = await httpClient.GetDiscoveryDocumentAsync("https://logto.test.extimaging.com/oidc");
if (disco.IsError)
{
Console.WriteLine(disco.Error);
}
string codeVerifier = "QMSBBxTQrpKPscvNNfmaQfmyk5Wd33GZS1FKSo3Shv8w-59vW1iTSlgAznYojkYv2DgR4XhTqySsBnDPq0";
// OIDC 配置,替换为您的 OIDC 提供者的配置
string tokenEndpoint = "https://logto.test.extimaging.com/oidc/token"; // 替换为实际 token 端点
string clientId = "aj34vqrpvz8olsbxwtcog";
string redirectUri = "http://localhost:6100/OAuth/TestPKCECallBack"; // 替换为前端的回调 URL
var baseUrl = "https://logto.test.extimaging.com";
var opts = new RestClientOptions(baseUrl);
using var client = new RestClient(opts);
//https://blog.logto.io/troubleshoot-invalid-grant-error/
var request = new RestRequest("oidc/token", Method.Post)
.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("grant_type", "authorization_code")
.AddParameter("code", code)
.AddParameter("redirect_uri", redirectUri)
.AddParameter("client_id", clientId)
.AddParameter("code_verifier", codeVerifier); // 使用 PKCE
// 发送请求并获取响应
var response = await client.ExecuteAsync<LogtoTokenResponse>(request);
if (response.StatusCode == HttpStatusCode.OK)
{
var tokenResponse = response.Data;
Console.WriteLine(tokenResponse.ToJsonStr());
var userInfoRequest = new RestRequest($"oidc/me", Method.Get)
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
var userResponse = await client.ExecuteAsync(userInfoRequest);
Console.WriteLine(userResponse.Content);
//结束回话
var endUrl = new RequestUrl(disco.EndSessionEndpoint).CreateEndSessionUrl(tokenResponse.IdToken, "http://localhost:6100/OAuth/TestPCKEOrgin");
var _endHttpClient = new HttpClient();
var dd = await _endHttpClient.GetAsync(endUrl);
}
return ResponseOutput.Ok();
}
#endregion
#region authorization_code OidcClient PKCE
[AllowAnonymous]
[RoutePattern(HttpMethod = "Get")]
public IResponseOutput TestPKCE()
{
// 1. 生成 code_verifier 和 code_challenge
string codeVerifier = "QMSBBxTQrpKPscvNNfmaQfmyk5Wd33GZS1FKSo3Shv8w-59vW1iTSlgAznYojkYv2DgR4XhTqySsBnDPq0";
string codeChallenge = PkceUtil.GenerateCodeChallenge(codeVerifier);
Console.WriteLine(codeVerifier);
string clientId = "aj34vqrpvz8olsbxwtcog";
string redirectUri = "http://localhost:6100/OAuth/TestOidcClientPKCECallBack";
string state = "123456";
// 构造请求的 URL
string authorizationUrl = $"https://logto.test.extimaging.com/oidc/auth" +
$"?client_id={clientId}" +
$"&redirect_uri={Uri.EscapeDataString(redirectUri)}" +
$"&response_type=code" +
$"&scope=openid profile email phone" +
$"&code_challenge={codeChallenge}" +
$"&code_challenge_method=S256" +
$"&state={state}";
Console.WriteLine("请将以下 URL 复制到浏览器中,完成登录后获取 code:");
Console.WriteLine(authorizationUrl);
return ResponseOutput.Ok();
}
[AllowAnonymous]
[RoutePattern(HttpMethod = "Get")]
public async Task<IResponseOutput> TestOidcClientPKCECallBackAsync(string code)
{
//使用IdentityModel.OidcClient 测试
var client = new HttpClient();
var disco = await client.GetDiscoveryDocumentAsync("https://logto.test.extimaging.com/oidc");
if (disco.IsError)
{
Console.WriteLine(disco.Error);
}
// OIDC 配置,替换为您的 OIDC 提供者的配置
string clientId = "aj34vqrpvz8olsbxwtcog";
string codeVerifier = "QMSBBxTQrpKPscvNNfmaQfmyk5Wd33GZS1FKSo3Shv8w-59vW1iTSlgAznYojkYv2DgR4XhTqySsBnDPq0";
string redirectUri = "http://localhost:6100/OAuth/TestOidcClientPKCECallBack"; // 替换为前端的回调 URL
var requestBody = new Dictionary<string, string>
{
{ "grant_type", "authorization_code" },
{ "code", code },
{ "redirect_uri", redirectUri },
{ "client_id", clientId },
{ "code_verifier", codeVerifier } // 使用 PKCE
};
var _httpClient = new HttpClient();
var content = new FormUrlEncodedContent(requestBody);
// 发出 token 请求
var response = await _httpClient.PostAsync(disco.TokenEndpoint, content);
if (response.IsSuccessStatusCode)
{
var responseBody = await response.Content.ReadAsStringAsync();
// 解析 JSON
var jsonObject = JObject.Parse(responseBody);
// 格式化并输出 JSON
var formattedJson = jsonObject.ToString(Formatting.Indented);
Console.WriteLine(formattedJson);
var tokenResponse = JsonConvert.DeserializeObject<LogtoTokenResponse>(responseBody);
Console.WriteLine(tokenResponse);
//结束回话
var parameters = new Parameters();
parameters.Add("clientId", "aj34vqrpvz8olsbxwtcog");
var endUrl = new RequestUrl(disco.EndSessionEndpoint).CreateEndSessionUrl(tokenResponse.IdToken, "http://localhost:6100/OAuth/TestPCKEOrgin", extra: parameters);
Results.Redirect(endUrl);
//var _endHttpClient = new HttpClient();
//var dd = await _endHttpClient.GetAsync(endUrl);
}
else
{
var errorContent = await response.Content.ReadAsStringAsync();
throw new Exception($"Error: {errorContent}");
}
#region Secret
//// 准备请求内容
//var tokenRequest = new AuthorizationCodeTokenRequest
//{
// Address = disco.TokenEndpoint,
// ClientId = clientId,
// Code = code,
// RedirectUri = redirectUri,
// GrantType = "authorization_code",
// CodeVerifier = codeVerifier
//};
//var tokenResponse = await _httpClient.RequestTokenAsync(tokenRequest);
//if (tokenResponse.HttpStatusCode == HttpStatusCode.OK)
//{
// var apiClient = new HttpClient();
// apiClient.SetBearerToken(tokenResponse.AccessToken);
// var response = await apiClient.GetAsync(disco.UserInfoEndpoint);
// if (!response.IsSuccessStatusCode)
// {
// Console.WriteLine(response.StatusCode);
// Console.WriteLine(response.ReasonPhrase);
// }
// else
// {
// var doc = JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;
// Console.WriteLine(JsonSerializer.Serialize(doc, new JsonSerializerOptions { WriteIndented = true }));
// //获取刷新token
// var refreshClient = new HttpClient();
// var refreshRequest = new RefreshTokenRequest
// {
// Address = disco.TokenEndpoint,
// ClientId = clientId,
// RefreshToken = tokenResponse.RefreshToken,
// };
// var refreshResponse = await refreshClient.RequestRefreshTokenAsync(refreshRequest);
// if (refreshResponse.IsError)
// {
// Console.WriteLine($"Error: {refreshResponse.Error}");
// }
// else
// {
// Console.WriteLine("获取刷新token 完成");
// Console.WriteLine("AccessToken:" + refreshResponse.AccessToken);
// Console.WriteLine("RefreshToken:" + refreshResponse.RefreshToken);
// }
// }
//}
#endregion
return ResponseOutput.Ok();
}
#endregion
#region OIDC authorization_code with client_secret
[AllowAnonymous]
public IResponseOutput TestOidcClientWithSecret()
{
string clientId = "tl42rjin7obxtwqqgvkti";
string redirectUri = "http://localhost:6100/OAuth/TestOidcClientCallBack";
string state = "123456";
// 构造请求的 URL
string authorizationUrl = $"https://logto.test.extimaging.com/oidc/auth" +
$"?client_id={clientId}" +
$"&redirect_uri={Uri.EscapeDataString(redirectUri)}" +
$"&response_type=code" +
$"&scope=openid profile email phone" +
$"&state={state}";
Console.WriteLine(authorizationUrl);
return ResponseOutput.Ok();
}
[AllowAnonymous]
[RoutePattern(HttpMethod = "Get")]
public async Task<IResponseOutput> TestOidcClientCallBackAsync(string code)
{
//使用IdentityModel.OidcClient 测试
var client = new HttpClient();
var disco = await client.GetDiscoveryDocumentAsync("https://logto.test.extimaging.com/oidc");
if (disco.IsError)
{
Console.WriteLine(disco.Error);
}
// OIDC 配置,替换为您的 OIDC 提供者的配置
string clientId = "tl42rjin7obxtwqqgvkti";
string clientSecret = "Pu9ig4rz44aLlxb0yKUaOiZaFk6Bcu51";
string redirectUri = "http://localhost:6100/OAuth/TestOidcClientCallBack"; // 替换为前端的回调 URL
string postLogoutRedirectUri = "http://localhost:6100/OAuth/TestPCKEOrgin"; //退出回话重定向到前端的url
// 准备请求内容
var tokenRequest = new AuthorizationCodeTokenRequest
{
Address = disco.TokenEndpoint,
ClientId = clientId,
ClientSecret = clientSecret,
Code = code,
RedirectUri = redirectUri,
GrantType = "authorization_code",
};
var _httpClient = new HttpClient();
// 发出 token 请求
var tokenResponse = await _httpClient.RequestAuthorizationCodeTokenAsync(tokenRequest);
if (tokenResponse.HttpStatusCode == HttpStatusCode.OK)
{
var apiClient = new HttpClient();
apiClient.SetBearerToken(tokenResponse.AccessToken);
var response = await apiClient.GetAsync(disco.UserInfoEndpoint);
if (!response.IsSuccessStatusCode)
{
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.ReasonPhrase);
}
else
{
var doc = JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;
Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(doc, new JsonSerializerOptions { WriteIndented = true }));
//获取刷新token
var refreshClient = new HttpClient();
var refreshRequest = new RefreshTokenRequest
{
Address = disco.TokenEndpoint,
ClientId = clientId,
ClientSecret = clientSecret,
RefreshToken = tokenResponse.RefreshToken,
};
var refreshResponse = await refreshClient.RequestRefreshTokenAsync(refreshRequest);
if (refreshResponse.IsError)
{
Console.WriteLine($"Error: {refreshResponse.Error}");
}
else
{
Console.WriteLine("获取刷新token 完成");
Console.WriteLine("AccessToken:" + refreshResponse.AccessToken);
Console.WriteLine("RefreshToken:" + refreshResponse.RefreshToken);
}
}
}
return ResponseOutput.Ok();
}
#endregion
#region
/// <summary>
/// 测试客户端凭证代码
/// </summary>
/// <returns></returns>
public async Task<IResponseOutput> TestClientCredentialsAsync()
{
#region 使IdentityModel.OidcClient
// discover endpoints from metadata
var client = new HttpClient();
var disco = await client.GetDiscoveryDocumentAsync("https://logto.test.extimaging.com/oidc");
if (disco.IsError)
{
Console.WriteLine(disco.Error);
}
// request token
var tokenResponse = await client.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
{
Address = disco.TokenEndpoint,
ClientId = "v2mr2ndxwkxz0xpsuc1th",
ClientSecret = "yq9jUxl70QoOmwHxJ37h1rDoyJ5iz92Q",
Resource = new List<string>() { "https://default.logto.app/api" },
Scope = "all"
});
if (tokenResponse.IsError)
{
Console.WriteLine(tokenResponse.Error);
Console.WriteLine(tokenResponse.ErrorDescription);
}
else
{
Console.WriteLine(tokenResponse.AccessToken);
Console.WriteLine("\n\n");
// call api
var apiClient = new HttpClient();
apiClient.SetBearerToken(tokenResponse.AccessToken);
var response = await apiClient.GetAsync("https://logto.test.extimaging.com/api/applications");
if (!response.IsSuccessStatusCode)
{
Console.WriteLine(response.StatusCode);
}
else
{
var doc = JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;
Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(doc, new JsonSerializerOptions { WriteIndented = true }));
}
}
#endregion
return ResponseOutput.Ok();
}
public async Task<IResponseOutput> TestClientCredentialsOriginAsync()
{
#region logto
{
var baseUrl = "https://logto.test.extimaging.com";
var appId = "v2mr2ndxwkxz0xpsuc1th";
var appSecret = "yq9jUxl70QoOmwHxJ37h1rDoyJ5iz92Q";
var apiAddress = "https://default.logto.app/api"; //这里是个坑
var scope = "all";
var opts = new RestClientOptions(baseUrl);
using var client = new RestClient(opts);
//https://bump.sh/logto/doc/logto-management-api/authentication
var request = new RestRequest("oidc/token", Method.Post);
request
.AddHeader("Content-Type", "application/x-www-form-urlencoded")
.AddParameter("grant_type", "client_credentials")
.AddParameter("client_id", appId)
.AddParameter("client_secret", appSecret)
.AddParameter("resource", apiAddress) //注意这里默认值地址和api 地址有区别
.AddParameter("scope", scope);
var response = await client.ExecuteAsync<LogtoTokenResponse>(request);
if (response.StatusCode == HttpStatusCode.OK)
{
var tokenResponse = response.Data;
Console.WriteLine(tokenResponse.ToJsonStr());
#region
var applicationRequest = new RestRequest($"/api/applications", Method.Get)
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
var applicationResponse = await client.ExecuteAsync(applicationRequest);
#endregion
#region
//curl \
// -X GET https://[tenant_id].logto.app/api/users/{userId} \
// -H "Authorization: Bearer $ACCESS_TOKEN"
var userId = "4fqx4cb3438k";
var userInfoRequest = new RestRequest($"api/users/{userId}", Method.Get)
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
var userResponse = await client.ExecuteAsync<LogtoUser>(userInfoRequest);
Console.WriteLine(userResponse.Content);
#endregion
}
}
#endregion
return ResponseOutput.Ok();
}
#endregion
}
public static class PkceUtil
{
// 生成 code_verifier
public static string GenerateCodeVerifier()
{
var bytes = new byte[64];
using (var random = RandomNumberGenerator.Create())
{
random.GetBytes(bytes);
return Convert.ToBase64String(bytes)
.TrimEnd('=')
.Replace('+', '-')
.Replace('/', '_');
}
}
// 生成 code_challenge
public static string GenerateCodeChallenge(string codeVerifier)
{
using (var sha256 = SHA256.Create())
{
var bytes = sha256.ComputeHash(Encoding.UTF8.GetBytes(codeVerifier));
return Convert.ToBase64String(bytes)
.TrimEnd('=')
.Replace('+', '-')
.Replace('/', '_');
}
}
}
}
@@ -21,9 +21,62 @@ namespace IRaCIS.Core.Application.Service.MinimalApiService
/// </summary>
[ApiExplorerSettings(GroupName = "Institution")]
public class TestMinimalApiService(IUserInfo _userInfo) : ServiceBase
public class TestMinimalApiService(IUserInfo _userInfo, IRepository<TestLength> _testLengthRepository) : ServiceBase
{
/// <summary>
/// 测试efcore json 列支持情况
/// https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
/// </summary>
/// <returns></returns>
public async Task<IResponseOutput> TestEfcoreJson()
{
var dateTime = DateTime.Parse("2024-11-08");
//await _testLengthRepository.AddAsync(new TestLength()
//{
// Name = "Testddd",
// TestJsonObjectLsit=new List<TestJsonObject>() { new TestJsonObject() { Name="name1",Description="des1"} , new TestJsonObject() { Name = "name1", Description = "des1" } }
//});
//await _testLengthRepository.SaveChangesAsync();
//对于json 对象 不能使用count any 操作,但是简单的类型可以的
var jobjectList = _testLengthRepository.AsQueryable().ToList();
var jobjectList1 = _testLengthRepository.AsQueryable().Where(t=>t.TestJsonObjectLsit.Any(c=>c.Name=="name1")).ToList();
var jobjectList2 = _testLengthRepository.AsQueryable().Where(t => t.TestJsonObjectLsit.Any(c => c.Name == "name1")).SelectMany(t=>t.TestJsonObjectLsit).ToList();
var d1 = _testLengthRepository.Where(t => t.StringList.Any(t => t == "string1")).ToList();
var d2 = _testLengthRepository.Where(t => t.StringList.Contains("string1")).ToList();
//selectMany 报错 不支持
//var d20 = _testLengthRepository.Where(t => t.StringList.Contains("string1")).SelectMany(t => t.StringList).ToList();
var d3 = _testLengthRepository.Where(t => t.TestEnumList.Contains(TestEnum.Default)).ToList();
var d4 = _testLengthRepository.Where(t => t.TestEnumList.Any(t => t == TestEnum.Default)).ToList();
var d5 = _testLengthRepository.Where(t => t.DateTimeList.Contains(dateTime)).ToList();
var d6 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t == dateTime)).ToList();
var d7 = _testLengthRepository.Where(t=>t.DateTimeList.Any(t=>t.Year==2024)).ToList();
var d8 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Month == 11)).ToList();
var d90 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Year == 2024)).Select(t => t.DateTimeList).ToList();
//selectMany 报错 不支持
//var d9 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Year == 2024)).SelectMany(t=>t.DateTimeList).ToList();
//var d10 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Year == 2024)).SelectMany(t => t.DateTimeList).Where(t=>t>dateTime.AddSeconds(1)).ToList();
return ResponseOutput.Ok();
}
[TrialGlobalLimit("AddOrUpdateTrial", "BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
public Task<List<string>> GetProjectList1Async()
@@ -38,7 +91,7 @@ namespace IRaCIS.Core.Application.Service.MinimalApiService
}
[AllowAnonymous]
[TrialGlobalLimit( "BeforeOngoingCantOpt")]
[TrialGlobalLimit("BeforeOngoingCantOpt")]
public IResponseOutput GetTest()
{
@@ -199,7 +199,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
public class QCChallengeWithUser : QCChallengeCommand
{
public bool IsBaseLine { get; set; }
public string VisitName { get; set; }
public string BlindName { get; set; } = string.Empty;
public string SubjectCode { get; set; }
@@ -222,6 +222,8 @@ namespace IRaCIS.Core.Application.Contracts.DTO
public bool IsClosed { get; set; }
public DateTime? ReUploadedTime { get; set; }
public string CreateUserName { get; set; } = String.Empty;
public string CreateUserFullName { get; set; } = String.Empty;
public DateTime CreateTime { get; set; }
public bool IsOverTime => IsClosed ? ClosedTime > DeadlineTime : DateTime.Now > DeadlineTime;
@@ -226,11 +226,17 @@ namespace IRaCIS.Core.Application.Contracts
public string SubjectCode { get; set; } = String.Empty;
[DictionaryTranslateAttribute("Subject_Visit_Status")]
public SubjectStatus SubjectStatus { get; set; }
public String TrialSiteCode { get; set; } = String.Empty;
public DateTime? EarliestScanDate { get; set; }
public DateTime? LatestScanDate { get; set; }
public string EarliestScanDateStr => EarliestScanDate?.ToString("yyyy-MM-dd") ?? string.Empty;
public string LatestScanDateStr => LatestScanDate?.ToString("yyyy-MM-dd") ?? string.Empty;
public DateTime? SubmitTime { get; set; }
@@ -293,7 +299,18 @@ namespace IRaCIS.Core.Application.Contracts
public string LatestReplyUserName { get; set; } = String.Empty;
public string Content { get; set; } = string.Empty;
public string ContentReplaced => Content.Replace("<br>","").Replace("<br/>", "").Replace("<div style='margin-left:20px'>", "").Replace("</div>","");
public string ContentReplaced {
get {
var msg= Content.Replace("<div style='margin-left:20px'>", "").Replace("</div>", "");
string[] substrings = msg.Split(new string[] { "<br>", "<br/>" }, StringSplitOptions.None);
return string.Join("\n\n", substrings);
}
}
[DictionaryTranslateAttribute("ChallengeIsClosed")]
public bool IsClosed { get; set; }
@@ -377,7 +394,7 @@ namespace IRaCIS.Core.Application.Contracts
//public bool IsUrgent { get; set; }
//[ExcelColumn(Name = "FirstGiveMedicineTime", Format = "yyyy-MM-dd")]
public DateTime? FirstGiveMedicineTime { get; set; }
public DateOnly? FirstGiveMedicineTime { get; set; }
public string FirstGiveMedicineTimeStr => FirstGiveMedicineTime?.ToString("yyyy-MM-dd");
@@ -740,6 +757,8 @@ namespace IRaCIS.Core.Application.Contracts
public DateTime? LatestScanDate { get; set; }
public string LatestScanDateStr => LatestScanDate?.ToString("yyyy-MM-dd") ?? string.Empty;
public List<string> ModalityList { get; set; }
public string Modalitys => string.Join(',', ModalityList);
@@ -1087,6 +1106,7 @@ namespace IRaCIS.Core.Application.Contracts
public string UserName { get; set; }
public bool? IsBaseline { get; set; }
public ReadingCategory ReadingCategory { get; set; }
/// <summary>
/// 自身一致性分析任务上会有这个值
@@ -1150,6 +1170,8 @@ namespace IRaCIS.Core.Application.Contracts
{
public List<CommonQuesionInfo> QuestionAnswerList { get; set; }
public List<decimal> SubjectCriterionReadingPeriodVisitNumList { get; set; }
public String TrialSiteCode { get; set; } = String.Empty;
public string SubjectCode { get; set; } = String.Empty;
@@ -1183,8 +1205,8 @@ namespace IRaCIS.Core.Application.Contracts
//在当前访视触发裁判,或者在截止日期小于等于当前访视的阅片期触发裁判
[DictionaryTranslateAttribute("YesOrNo")]
public bool IsTrigerJudge { get; set; }
[DictionaryTranslateAttribute("YesOrNoAudit")]
public bool? IsTrigerJudge { get; set; }
//(如果是访视点裁判,则仅在所选阅片人对应访视 显示;如果是阅片期裁判,则在所选阅片人 阅片期内的所有访视 显示此原因)
public string JudgeNote { get; set; } = string.Empty;
@@ -154,6 +154,8 @@ namespace IRaCIS.Core.Application.Image.QA
var pageList = await query.ToPagedListAsync(inQuery, new string[] { nameof(QCCRCChallengeViewModel.IsUrgent) + " desc", nameof(QCCRCChallengeViewModel.CreateTime) });
var config = await _trialRepository.Where(t => t.Id == inQuery.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
config.IsHaveSubjectClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == inQuery.TrialId && x.IsConfirm && (x.ClinicalDataLevel == ClinicalLevel.Subject) && x.UploadRole == UploadRole.CRC);
config.IsHaveVisitClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == inQuery.TrialId && x.IsConfirm && (x.ClinicalDataLevel == ClinicalLevel.SubjectVisit) && x.UploadRole == UploadRole.CRC);
return ResponseOutput.Ok(pageList, config);
}
@@ -27,6 +27,8 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
.ForMember(d => d.QCProcessEnum, u => u.MapFrom(s => s.Trial.QCProcessEnum))
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
.ForMember(d => d.SubjectStatus, u => u.MapFrom(s => s.Subject.Status))
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName))
.ForMember(d => d.ClinicalInformationTransmissionEnum, u => u.MapFrom(s => s.Trial.ClinicalInformationTransmissionEnum))
@@ -47,7 +49,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<QCChallengeDialog, DialogInfo>()
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName))
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
CreateMap<QCChallenge, QCChanllengeExportDto>()
@@ -122,7 +124,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<CheckChallengeDialog, DialogInfo>()
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName))
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
CreateMap<SubjectVisit, PMKCheckEXportDTO>()
@@ -253,8 +255,14 @@ namespace IRaCIS.Core.Application.Service
(arbitrationRule == ArbitrationRule.Reading ?
u.Subject.SubjectVisitTaskList.Any(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Judge && t.TrialReadingCriterionId == trialReadingCriterionId && u.VisitTaskNum < t.VisitTaskNum) :
false)))
.ForMember(o => o.JudgeNote, t => t.MapFrom(u => u.JudgeVisitTask.JudgeResultRemark))
.ForMember(o => o.JudgeNote, t => t.MapFrom(u => u.ReadingCategory==ReadingCategory.Judge? u.JudgeResultRemark : u.JudgeVisitTask.JudgeResultRemark))
.ForMember(o => o.VisitNote, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.AdjustReason).FirstOrDefault()!.Answer))
//.ForMember(o => o.IsSubjectHaveReadingPeriod, t => t.MapFrom(u => arbitrationRule == ArbitrationRule.Reading ?
//u.Subject.ReadModuleList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.ReadingSetType == ReadingSetType.ImageReading) : false))
.ForMember(o => o.SubjectCriterionReadingPeriodVisitNumList, t => t.MapFrom(u =>
u.Subject.ReadModuleList.Where(t=>t.TrialReadingCriterionId == trialReadingCriterionId && t.ReadingSetType == ReadingSetType.ImageReading).Select(c=>c.SubjectVisit.VisitNum)))
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
@@ -276,7 +284,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadingTableAnswerRowInfo, CommonLessionInfo>()
.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.RowMark))
.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
.ForMember(o => o.LessionAnswerList, t => t.MapFrom(u => u.LesionAnswerList));
.ForMember(o => o.LessionAnswerList, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.ExportResultStr.Contains(((int)readingExportType).ToString()))));
CreateMap<ReadingTableQuestionAnswer, CommonLessionQuestionAnswerInfo>()
.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark))
@@ -600,24 +608,25 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.IsCurrentUser, u => u.MapFrom(s => s.CreateUserId == currentUserId));
//质疑编号
CreateMap<QCChallenge, QCChallengeWithUser>()
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName))
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.UserName))
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName))
.ForMember(d => d.SubjectId, u => u.MapFrom(t => t.SubjectVisit.SubjectId))
.ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode))
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
.ForMember(d => d.IsBaseLine, u => u.MapFrom(s => s.SubjectVisit.IsBaseLine))
.ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName));
CreateMap<QCChallenge, ChallengeAndDialog>()
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName))
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.UserName))
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName))
.ForMember(d => d.SubjectId, u => u.MapFrom(t => t.SubjectVisit.SubjectId))
.ForMember(d => d.DialogList, u => u.MapFrom(t => t.DialogList.OrderBy(t => t.CreateTime)))
@@ -625,6 +634,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
.ForMember(d => d.IsBaseLine, u => u.MapFrom(s => s.SubjectVisit.IsBaseLine))
.ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName))
;
@@ -691,14 +701,14 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
CreateMap<NoneDicomStudy, NoneDicomStudyView>()
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ? s.NoneDicomFileList.Where(t => !t.FileType.Contains(StaticData.FileType.Zip)) : s.NoneDicomFileList))
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ? s.NoneDicomFileList.Where(t => !t.FileType.Contains(StaticData.FileType.Zip)).OrderBy(t => t.FileType).ThenBy(t => t.FileName) : s.NoneDicomFileList.OrderBy(t => t.FileType).ThenBy(t => t.FileName)))
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
Guid? visiTaskId = null;
CreateMap<NoneDicomStudy, TaskDicomStudyView>()
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ?
s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).Where(t => !t.FileType.Contains(StaticData.FileType.Zip))
: s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true)))
s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).Where(t => !t.FileType.Contains(StaticData.FileType.Zip)).OrderBy(t => t.FileType).ThenBy(t=>t.FileName)
: s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).OrderBy(t => t.FileType).ThenBy(t => t.FileName)))
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
}
@@ -336,10 +336,10 @@ namespace IRaCIS.Core.Application.Service
}).ToListAsync();
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
var tableQuestions = await _trialClinicalTableQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
questions.ForEach(x => x.CreateTime = formInfo.CreateTime);
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
@@ -36,6 +36,8 @@ namespace IRaCIS.Core.Application.Service
#region
/// <summary>
/// 新增或者修改
/// </summary>
@@ -605,6 +607,25 @@ namespace IRaCIS.Core.Application.Service
#region
/// <summary>
/// 获取访视临床数据名称
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<GetVisitClinicalDataNameOutDto> GetVisitClinicalDataName(GetVisitClinicalDataNameInDto inDto)
{
var clinicalDataNames = await _readingClinicalDataRepository.Where(x => x.ReadingId == inDto.Id).Select(x =>
_userInfo.IsEn_Us ? x.ClinicalDataTrialSet.ClinicalDataSetEnName : x.ClinicalDataTrialSet.ClinicalDataSetName).Distinct().ToListAsync();
return new GetVisitClinicalDataNameOutDto()
{
ClinicalDataName = string.Join(_userInfo.IsEn_Us? ", ":"", clinicalDataNames),
};
}
/// <summary>
/// 获取下拉菜单
/// </summary>
@@ -701,23 +722,6 @@ namespace IRaCIS.Core.Application.Service
}
}
var readingIds = result.Select(x => x.ReadingId).ToList();
var previousHistoryList = await _previousHistoryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
var previousOtherList = await _previousOtherRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
var previousSurgeryList = await _previousSurgeryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
foreach (var item in result)
{
item.ClinicalTableData = new ClinicalDataTable()
{
PreviousHistoryList = previousHistoryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
PreviousOtherList = previousOtherList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
PreviousSurgeryList = previousSurgeryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
};
}
Dictionary<ClinicalLevel, int> keys = new Dictionary<ClinicalLevel, int>() {
{ClinicalLevel.SubjectVisit,0 },
{ClinicalLevel.ImageRead,2 },
@@ -809,6 +813,27 @@ namespace IRaCIS.Core.Application.Service
isSelfAnalysis = true;
}
}
//下面改用readingIdList筛选 不然
List<Guid> readingIdList = new List<Guid>() {};
if (inDto.VisitTaskId!=null)
{
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == inDto.ReadingId.Value).FirstOrDefaultAsync();
if (subjectVisit != null && !subjectVisit.IsBaseLine)
{
var baseId = await _subjectVisitRepository.Where(x => x.SubjectId == subjectVisit.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
readingIdList.Add(baseId);
}
var readModuleInfo = await _readModuleRepository.Where(x => x.Id == inDto.ReadingId.Value).FirstOrDefaultAsync();
if (readModuleInfo != null && readModuleInfo.ReadingSetType == ReadingSetType.ImageReading)
{
var baseId = await _subjectVisitRepository.Where(x => x.SubjectId == readModuleInfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
readingIdList.Add(baseId);
}
}
// 一致性分析
if (isSelfAnalysis)
{
@@ -817,7 +842,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
.Where(x => x.ReadingId == inDto.ReadingId)
.Where(x => x.ReadingId == inDto.ReadingId||(readingIdList.Contains(x.ReadingId)&&x.ClinicalDataTrialSet.ClinicalDataLevel== ClinicalLevel.Subject))
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
.Select(x => new GetReadingClinicalDataListOutDto()
{
@@ -858,7 +883,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
.Where(x => x.ReadingId == inDto.ReadingId)
.Where(x => x.ReadingId == inDto.ReadingId || (readingIdList.Contains(x.ReadingId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject))
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
.Where(x => x.ClinicalDataTrialSet.ClinicalUploadType != ClinicalUploadType.PDF || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Study)
.Select(x => new GetReadingClinicalDataListOutDto()
@@ -901,7 +926,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
.Where(x => x.ReadingId == inDto.ReadingId)
.Where(x => x.ReadingId == inDto.ReadingId || (readingIdList.Contains(x.ReadingId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject))
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
.Select(x => new GetReadingClinicalDataListOutDto()
{
@@ -1061,17 +1086,17 @@ namespace IRaCIS.Core.Application.Service
}
}
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
var previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId || (readingIdList.Contains(x.SubjectVisitId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject)).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.ReadingId || (readingIdList.Contains(x.SubjectVisitId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject)).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
var previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId || (readingIdList.Contains(x.SubjectVisitId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject)).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
foreach (var item in result)
{
item.ClinicalTableData = new ClinicalDataTable()
{
PreviousHistoryList = previousHistoryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
PreviousOtherList = previousOtherList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
PreviousSurgeryList = previousSurgeryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
PreviousHistoryList = previousHistoryList.Where(x => x.SubjectVisitId == item.ReadingId).ToList(),
PreviousOtherList = previousOtherList.Where(x => x.SubjectVisitId == item.ReadingId).ToList(),
PreviousSurgeryList = previousSurgeryList.Where(x => x.SubjectVisitId == item.ReadingId).ToList(),
};
}
@@ -556,6 +556,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public DateTime CreateTime { get; set; }
}
/// <summary>
/// 获取临床数据名称
/// </summary>
public class GetVisitClinicalDataNameInDto
{
public Guid Id { get; set; }
}
public class GetVisitClinicalDataNameOutDto
{
public string ClinicalDataName { get; set; }
}
public class GetTrialClinicalDataSelectIndto
{
@@ -2436,6 +2436,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public string Type { get; set; }
public ValueUnit? Unit { get; set; }
/// <summary>
/// ParentId
/// </summary>
@@ -2499,7 +2501,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// <summary>
/// 是否显示
/// </summary>
public int ShowQuestion { get; set; }
public ShowQuestion ShowQuestion { get; set; }
/// <summary>
/// 最大问题数
@@ -2566,6 +2568,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public Guid ReadingQuestionCriterionSystemId { get; set; }
public ValueUnit? Unit { get; set; }
/// <summary>
/// 问题类型
@@ -2666,7 +2669,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// <summary>
/// 是否显示
/// </summary>
public ShowQuestion ShowQuestion { get; set; } = ShowQuestion.Show;
public ShowQuestion ShowQuestion { get; set; }
/// <summary>
/// 最大问题数
@@ -438,7 +438,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string Remark { get; set; }
public Guid? RelevanceId { get; set; }
public string RelevanceValue { get; set; } = string.Empty;
public int ShowQuestion { get; set; }
public ShowQuestion ShowQuestion { get; set; }
public int? MaxRowCount { get; set; }
public string DataTableName { get; set; } = string.Empty;
public string DataTableColumn { get; set; } = string.Empty;
@@ -577,7 +577,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string Remark { get; set; }
public Guid? RelevanceId { get; set; }
public string RelevanceValue { get; set; } = string.Empty;
public int ShowQuestion { get; set; }
public ShowQuestion ShowQuestion { get; set; }
public int? MaxRowCount { get; set; }
public string DataTableName { get; set; } = string.Empty;
public string DataTableColumn { get; set; } = string.Empty;
@@ -1707,7 +1707,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string RelevanceValue { get; set; } = string.Empty;
[Comment("是否显示")]
public int ShowQuestion { get; set; }
public ShowQuestion ShowQuestion { get; set; }
[Comment("最大问题数")]
public int? MaxRowCount { get; set; }
@@ -244,7 +244,7 @@ namespace IRaCIS.Core.Application.Service
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter))]
[TrialGlobalLimit("AfterStopCannNotOpt")]
public async Task<IResponseOutput> AddOrUpdateReadingMedicineTrialQuestion(ReadingMedicineTrialQuestionAddOrEdit inDto)
{
var existsQuery = _readingMedicineTrialQuestionRepository
@@ -578,7 +578,8 @@ namespace IRaCIS.Core.Application.Service
"select","radio","class",
};
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
.Where(x => types.Contains(x.Type))
.Where(x => types.Contains(x.Type)||(x.Type=="number"&&x.TypeValue!=string.Empty))
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
@@ -672,10 +673,10 @@ namespace IRaCIS.Core.Application.Service
var types = new List<string>()
{
"select","radio"
"select","radio","class"
};
var questionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId)
.Where(x => types.Contains(x.Type))
.Where(x => types.Contains(x.Type) || (x.Type == "number" && x.TypeValue != string.Empty))
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
.Select(x => new CriterionOtherQuestionOutDto()
@@ -1,4 +1,5 @@
using IRaCIS.Core.Application.Contracts;
using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Filter;
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Application.Interfaces;
@@ -14,6 +15,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NPOI.POIFS.Properties;
using NPOI.SS.Formula.Functions;
using Panda.DynamicWebApi.Attributes;
using ZiggyCreatures.Caching.Fusion;
@@ -1308,38 +1310,19 @@ namespace IRaCIS.Core.Application.Service
item.TableQuestions = new TrialReadTableQuestion();
item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x => x.ShowOrder).ToList();
item.TableQuestions.Questions.ForEach(x =>
{
x.RelationQuestions = tableQuestionLists.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetTrialReadingQuestionOutDto
x.RelationQuestions= _mapper.Map<List<GetTrialReadingQuestionOutDto>>(tableQuestionLists.Where(z => (z.DependParentId ?? default(Guid)) == x.Id));
x.RelationQuestions.ForEach(y =>
{
Childrens = new List<GetTrialReadingQuestionOutDto>(),
ShowOrder = x.ShowOrder,
GroupName = string.Empty,
Id = x.Id,
DictionaryCode = x.DictionaryCode,
Type = x.Type,
TableQuestionType = x.TableQuestionType,
DependParentId = x.DependParentId,
IsDepend = x.IsDepend,
QuestionMark = x.QuestionMark,
TypeValue = x.TypeValue,
RelevanceId = x.RelevanceId,
RelevanceValue = x.RelevanceValue,
ImageCount = 0,
ParentId = item.Id,
DataTableColumn = x.DataTableColumn,
LesionType = item.LesionType,
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
RelationQuestions = new List<GetTrialReadingQuestionOutDto>(),
Remark = x.Remark,
ValueType = x.ValueType,
Unit = x.Unit,
ClassifyAlgorithms=x.ClassifyAlgorithms,
IsCopy=x.IsCopy,
ClassifyTableQuestionId=x.ClassifyTableQuestionId,
}).ToList();
y.Childrens = new List<GetTrialReadingQuestionOutDto>();
y.GroupName = string.Empty;
y.ImageCount = 0;
y.ParentId = item.Id;
y.LesionType = item.LesionType;
y.RelationQuestions = new List<GetTrialReadingQuestionOutDto>();
});
});
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
@@ -2281,7 +2264,7 @@ namespace IRaCIS.Core.Application.Service
&& x.QuestionId == inDto.QuestionId
).CountAsync()) + 1))
{
throw new BusinessValidationFailedException(_localizer["ReadingImage_MaxQuestion", questionInfo.MaxQuestionCount]);
throw new BusinessValidationFailedException(_localizer["ReadingImage_MaxQuestion", _userInfo.IsEn_Us? questionInfo.QuestionEnName:questionInfo.QuestionName, questionInfo.MaxQuestionCount]);
}
}
@@ -2597,8 +2580,6 @@ namespace IRaCIS.Core.Application.Service
return ResponseOutput.Ok(true);
}
/// <summary>
/// 验证访视提交
/// </summary>
@@ -2649,6 +2630,7 @@ namespace IRaCIS.Core.Application.Service
throw new BusinessValidationFailedException(_localizer["ReadingImage_RequiredQuestion", string.Join(',', readingQuestionList.Select(x => x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)))]);
}
// 各个标准不同
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
var clinicalDataList = await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
@@ -1,9 +1,12 @@
using IRaCIS.Core.Application.Contracts;
using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common;
using Microsoft.AspNetCore.Mvc;
using NPOI.POIFS.Properties;
using Panda.DynamicWebApi.Attributes;
using System.Collections.Generic;
namespace IRaCIS.Core.Application.Service
{
@@ -265,62 +268,25 @@ namespace IRaCIS.Core.Application.Service
public void FindSystemChildQuestion(GetSystemReadingQuestionOutDto item, List<GetSystemReadingQuestionOutDto> questionlists, List<TableQuestionDataInfo> tableQuestions)
{
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupId == item.Id)).ToList();
item.Childrens.AddRange(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).Select(x => new GetSystemReadingQuestionOutDto
var itemChild = _mapper.Map<List<GetSystemReadingQuestionOutDto>>(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).ToList());
itemChild.ForEach(x =>
{
Childrens = new List<GetSystemReadingQuestionOutDto>(),
ShowOrder = x.ShowOrder,
GroupName = string.Empty,
Id = x.Id,
Type = x.Type,
DictionaryCode = x.DictionaryCode,
TableQuestionType = x.TableQuestionType,
DependParentId = x.DependParentId,
IsDepend = x.IsDepend,
QuestionMark = x.QuestionMark,
TypeValue = x.TypeValue,
RelevanceId = x.RelevanceId,
IsRequired = x.IsRequired,
RelevanceValue = x.RelevanceValue,
ImageCount = 0,
ParentId = item.Id,
DataTableColumn = x.DataTableColumn,
LesionType = item.LesionType,
QuestionName = x.QuestionName,
IsCopy=x.IsCopy,
ClassifyTableQuestionId= x.ClassifyTableQuestionId,
ClassifyAlgorithms=x.ClassifyAlgorithms,
RelationQuestions = tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetSystemReadingQuestionOutDto
x.Childrens = new List<GetSystemReadingQuestionOutDto>();
x.GroupName = string.Empty;
x.ImageCount = 0;
var relationQuestions= _mapper.Map<List<GetSystemReadingQuestionOutDto>>(tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).ToList());
relationQuestions.ForEach(y =>
{
Childrens = new List<GetSystemReadingQuestionOutDto>(),
ShowOrder = x.ShowOrder,
GroupName = string.Empty,
Id = x.Id,
DictionaryCode = x.DictionaryCode,
Type = x.Type,
TableQuestionType = x.TableQuestionType,
DependParentId = x.DependParentId,
IsDepend = x.IsDepend,
QuestionMark = x.QuestionMark,
TypeValue = x.TypeValue,
RelevanceId = x.RelevanceId,
RelevanceValue = x.RelevanceValue,
ImageCount = 0,
ParentId = item.Id,
DataTableColumn = x.DataTableColumn,
LesionType = item.LesionType,
QuestionName = x.QuestionName,
RelationQuestions = new List<GetSystemReadingQuestionOutDto>(),
Remark = x.Remark,
IsCopy = x.IsCopy,
ClassifyTableQuestionId = x.ClassifyTableQuestionId,
ClassifyAlgorithms = x.ClassifyAlgorithms,
}).ToList(),
Remark = x.Remark,
}));
y.Childrens = new List<GetSystemReadingQuestionOutDto>();
y.GroupName = string.Empty;
y.ImageCount = 0;
y.LesionType = item.LesionType;
y.RelationQuestions = new List<GetSystemReadingQuestionOutDto>();
});
x.RelationQuestions= relationQuestions;
});
item.Childrens.AddRange(itemChild);
if (item.Childrens != null && item.Childrens.Count != 0)
{
item.Childrens.ForEach(x =>
@@ -211,6 +211,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadingQuestionSystem, GetSystemReadingQuestionOutDto>()
;
CreateMap<TableQuestionDataInfo, GetSystemReadingQuestionOutDto>();
CreateMap<ReadingTableQuestionSystem, TableQuestionDataInfo>();
CreateMap<ReadingTableQuestionTrial, TableQuestionDataInfo>()
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
@@ -351,6 +353,9 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName))
.ForMember(x => x.Id, y => y.MapFrom(z => z.Id));
CreateMap<TableQuestionTrial, GetTrialReadingQuestionOutDto>();
//CreateMap<VisitTask, GetReadingPastResultListOutDto>()
// .ForMember(x => x.VisitTaskId, y => y.MapFrom(z => z.Id))
// .ForMember(x => x.JudgeResultArm, y => y.MapFrom(z => (z.JudgeResultTask==null?null:z.JudgeResultTask.ArmEnum)));
@@ -626,6 +626,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]);
}
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
decimal getdecimalData(string value)
{
return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
};
List<IVUSMeasuredValue> measuredValueList = new List<IVUSMeasuredValue>();
@@ -638,8 +643,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
iVUSMeasuredValue = new IVUSMeasuredValue()
{
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
Emm = decimal.Parse(dataTable.Rows[i]["B"].ToString()),
Lumen = decimal.Parse(dataTable.Rows[i]["C"].ToString()),
Emm = getdecimalData(dataTable.Rows[i]["B"].ToString()),
Lumen = getdecimalData(dataTable.Rows[i]["C"].ToString()),
};
}
catch (Exception)
@@ -703,7 +708,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
if (taskinfo.TrialReadingCriterion.DigitPlaces != -1)
{
var digitPlaces= taskinfo.TrialReadingCriterion.DigitPlaces??0;
emm = decimal.Round(decimal.Parse(emm ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
lumen = decimal.Round(decimal.Parse(lumen ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
emmSubtractionLumen = decimal.Round(decimal.Parse(emmSubtractionLumen ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
@@ -742,6 +747,22 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
RowIndex = maxnum,
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.ElasticAreaDiffValue).Select(x => x.Id).FirstOrDefault(),
});
// 添加其他问题答案
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
{
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
Answer = string.Empty,
QuestionId = questionInfo.Id,
TrialId = taskinfo.TrialId,
VisitTaskId = taskinfo.Id,
RowId = newRowId,
RowIndex = maxnum,
TableQuestionId = otherQuestion.Id,
});
}
}
@@ -924,6 +945,21 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
RowIndex = item,
TableQuestionId = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.EEMSubtractLumenSum).Select(x => x.Id).FirstOrDefault(),
});
// 添加其他问题答案
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
{
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
Answer = string.Empty,
QuestionId = questionInfo!.QuestionId,
TrialId = inDto.TrialId,
VisitTaskId = inDto.VisitTaskId,
RowId = newRowId,
RowIndex = item,
TableQuestionId = otherQuestion.Id,
});
}
}
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => (x.QuestionId == questionInfo.QuestionId || x.QuestionId == pAVquestionInfo.QuestionId) && x.VisitTaskId == inDto.VisitTaskId);
@@ -609,6 +609,23 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
RowIndex = maxnum,
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Id).FirstOrDefault(),
});
// 添加其他问题答案
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
{
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
Answer = string.Empty,
QuestionId = questionInfo.Id,
TrialId = taskinfo.TrialId,
VisitTaskId = taskinfo.Id,
RowId = newRowId,
RowIndex = maxnum,
TableQuestionId = otherQuestion.Id,
});
}
}
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
@@ -768,7 +785,22 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
RowId = newRowId,
RowIndex = maxnum,
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Id).FirstOrDefault(),
});
});
// 添加其他问题答案
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
{
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
Answer = string.Empty,
QuestionId = questionInfo.Id,
TrialId = taskinfo.TrialId,
VisitTaskId = taskinfo.Id,
RowId = newRowId,
RowIndex = maxnum,
TableQuestionId = otherQuestion.Id,
});
}
}
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
@@ -1070,6 +1102,22 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
});
// 添加其他问题答案
foreach (var otherQuestion in patchDataTableQuestion.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
{
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
Answer = string.Empty,
QuestionId = patchDataStatisticsInfo.Id,
TrialId = inDto.TrialId,
VisitTaskId = inDto.VisitTaskId,
RowId = newRowId,
RowIndex = item,
TableQuestionId = otherQuestion.Id,
});
}
}
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x =>x.QuestionId== patchDataStatisticsInfo.Id && x.VisitTaskId == inDto.VisitTaskId);
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == patchDataStatisticsInfo.Id && x.VisitTaskId == inDto.VisitTaskId);
@@ -1120,6 +1168,29 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// <returns></returns>
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
{
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
var question = await _readingQuestionTrialRepository.Where(x => x.LesionType == LesionType.PatchDataStatistics && x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).FirstNotNullAsync();
var tableQuestions = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId== question.Id)
.Where(x => x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show).ToListAsync();
var rowinfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == question.Id).Include(x=>x.ReadingQuestionTrial).OrderBy(x => x.RowIndex).ToListAsync();
var tableQuesionAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == question.Id).ToListAsync();
foreach (var item in rowinfoList)
{
foreach (var tq in tableQuestions)
{
var answer = tableQuesionAnswerList.Where(x => x.TableQuestionId == tq.Id && x.RowId == item.Id).FirstOrDefault();
if (answer == null || answer.Answer.IsNullOrEmpty())
{
throw new BusinessValidationFailedException(_localizer["OCTTableRequired", item.ReadingQuestionTrial.OrderMark+ item.RowIndex.GetLesionMark()]);
}
}
}
}
@@ -4,6 +4,7 @@
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.Contracts
@@ -222,11 +223,25 @@ namespace IRaCIS.Core.Application.Contracts
}
public class UseEmialGetDoctorInfoOutDto
{
public Guid DoctorId { get; set; }
}
public class UseEmialGetDoctorInfoInDto
{
public string EmailOrPhone { get; set; }
public Guid TrialId { get; set; }
}
public class VerifyEmialGetDoctorInfoInDto
{
public string VerificationCode { get; set; }
public string EmailOrPhone { get; set; }
public Guid? TrialId { get; set; }
}
/// <summary>
@@ -20,6 +20,7 @@ using Newtonsoft.Json;
using System.Text.RegularExpressions;
using static MassTransit.ValidationResultExtensions;
using DocumentFormat.OpenXml.Vml.Spreadsheet;
using IdentityModel.OidcClient;
namespace IRaCIS.Core.Application.Contracts
{
@@ -114,6 +115,56 @@ namespace IRaCIS.Core.Application.Contracts
}
/// <summary>
/// 根据邮箱获取DoctorId 没有的话创建一个
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<UseEmialGetDoctorInfoOutDto> UseEmialGetDoctorInfo(UseEmialGetDoctorInfoInDto inDto)
{
var dockerInfo = await _doctorRepository.Where(t => t.EMail == inDto.EmailOrPhone || t.Phone == inDto.EmailOrPhone).FirstOrDefaultAsync();
if (dockerInfo != null)
{
return new UseEmialGetDoctorInfoOutDto()
{
DoctorId = dockerInfo.Id
};
}
else
{
var isVirtual = true;
if (inDto.TrialId != null)
{
isVirtual = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.TrialType != TrialType.OfficialTrial).FirstNotNullAsync();
}
Doctor doctor = new Doctor()
{
EMail = inDto.EmailOrPhone,
IsVirtual = isVirtual,
AcceptingNewTrial = false,
ActivelyReading =false,
ResumeStatus = ResumeStatusEnum.Pass,
CooperateStatus = ContractorStatusEnum.Noncooperation,
ReviewStatus = ReviewerInformationConfirmStatus.ConfirmRefuse
};
var info = await _doctorRepository.AddAsync(doctor, true);
return new UseEmialGetDoctorInfoOutDto()
{
DoctorId = info.Id
};
}
}
/// <summary>
/// 验证邮箱验证码 获取医生信息Id
/// </summary>
@@ -155,18 +206,36 @@ namespace IRaCIS.Core.Application.Contracts
}
else
{
var isVirtual = true;
if (inDto.TrialId != null)
{
isVirtual = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.TrialType != TrialType.OfficialTrial).FirstNotNullAsync();
}
Doctor doctor = new Doctor()
{
EMail = inDto.EmailOrPhone
EMail = inDto.EmailOrPhone,
IsVirtual = isVirtual,
AcceptingNewTrial=false,
ActivelyReading=false,
CooperateStatus= ContractorStatusEnum.Noncooperation,
ReviewStatus= ReviewerInformationConfirmStatus.ConfirmRefuse
};
var info=await _doctorRepository.AddAsync(doctor,true);
//await _userRepository.BatchUpdateNoTrackingAsync(x => x.EMail == inDto.EmailOrPhone, x => new User()
//{
// DoctorId = info.DoctorId,
//});
result.DoctorId = info.Id;
result.ReviewStatus = info.ReviewStatus;
}
result.Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()));
result.Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo() { Id= Guid.NewGuid() }));
}
}
@@ -813,7 +813,7 @@ namespace IRaCIS.Core.Application.Service
LastName = doctorItem.LastName,
ChineseName = doctorItem.ChineseName,
TrialCode = trialItem.TrialCode
TrialCode = trialItem==null?"": trialItem.TrialCode
};
return reviewerList.ToList();
@@ -1,7 +1,9 @@
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Domain.Share.Reading;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Application.Contracts
{
@@ -67,6 +69,9 @@ namespace IRaCIS.Core.Application.Contracts
public List<string> ModalityList { get; set; } = new List<string>();
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; }
}
public class ConfigTrialProcessInfoVerificationInDto
@@ -88,7 +88,7 @@ namespace IRaCIS.Application.Contracts
public string CriterionName { get; set; } = string.Empty;
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; } = new List<TrialObjectNameConfig>();
}
public class TrialModalitySelectDto
@@ -236,7 +236,48 @@ namespace IRaCIS.Application.Contracts
}
public class TrialExtraConfig
{
#region QC
//QC质控
public bool IsSupportQCDownloadImage { get; set; } = false;
#endregion
#region
public List<string> NotShowFieldList { get; set; } = new List<string>();
public List<SiteSurveyModifyFiled> ModifyFiledList { get; set; } = new List<SiteSurveyModifyFiled>();
#endregion
#region
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; }
#endregion
}
public class TrialPacsInfo
{
public int Port { get; set; }
public string Ip { get; set; }
public string TrialCalledAE { get; set; }
}
public class SiteSurveyModifyFiled
{
public string NeedModifyFiled { get; set; }
public string ReplaceContent { get; set; }
public string ReplaceContentCN { get; set; }
}
@@ -88,11 +88,14 @@ namespace IRaCIS.Application.Contracts
[ExcelFormat("yyyy-MM-dd")]
public DateTime? RemoveTime { get; set; }
public string RemoveTimeStr=> RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty;
//[ExporterHeader(Format = "yyyy-mm-DD")]
[ExcelFormat("yyyy-MM-dd")]
public DateTime? JoinTime { get; set; }
public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty;
//[ExporterHeader(Format = "yyyy-mm-DD hh:mm:ss")]
[ExcelFormat("yyyy-MM-dd HH:mm:ss")]
@@ -1,4 +1,5 @@
using IRaCIS.Application.Interfaces;
using IRaCIS.Application.Contracts;
using IRaCIS.Application.Interfaces;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Filter;
using IRaCIS.Core.Application.Helper;
@@ -40,7 +41,7 @@ namespace IRaCIS.Core.Application
IRepository<SubjectVisit> _subjectVisitRepository,
IRepository<Enroll> _enrollRepository,
IRepository<TrialStateChange> _trialStateChangeRepository,
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository,
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository,
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, ITrialConfigService
{
@@ -319,7 +320,7 @@ namespace IRaCIS.Core.Application
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
public async Task<IResponseOutput> SetGlobalReadingInfo(SetGlobalReadingInfoInDto inDto)
{
@@ -404,7 +405,7 @@ namespace IRaCIS.Core.Application
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
public async Task<IResponseOutput> SetOncologySet(SetOncologySetInDto inDto)
{
@@ -548,7 +549,7 @@ namespace IRaCIS.Core.Application
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto)
{
ArbitrationRule arbitration = ArbitrationRule.NA;
@@ -898,7 +899,7 @@ namespace IRaCIS.Core.Application
/// <returns></returns>
[HttpPut]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
public async Task<IResponseOutput> ConfigTrialBasicInfo(BasicTrialConfig trialConfig)
{
await VerifyOnlyInOngoingOrInitialIzingOptAsync(trialConfig.TrialId);
@@ -906,9 +907,11 @@ namespace IRaCIS.Core.Application
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
trialConfig.Modalitys = $"{String.Join('|', trialConfig.ModalityList)}";
_mapper.Map(trialConfig, trialInfo);
trialInfo.UpdateTime = DateTime.Now;
//_trialRepository.MarkAsModified(trialInfo, nameof(trialInfo.TrialObjectNameList));
//await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialConfig.TrialId && t.IsSigned == false, u => new ReadingQuestionCriterionTrial() { CriterionModalitys = trialConfig.Modalitys });
@@ -923,7 +926,7 @@ namespace IRaCIS.Core.Application
/// <returns></returns>
/// <exception cref="BusinessValidationFailedException"></exception>
[HttpPost]
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
public async Task ConfigTrialProcessInfoVerification(ConfigTrialProcessInfoVerificationInDto trialConfig)
{
if (!await _trialRepository.Where(t => t.Id == trialConfig.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialState.TrialInitializing))
@@ -950,7 +953,7 @@ namespace IRaCIS.Core.Application
/// <returns></returns>
[HttpPut]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
public async Task<IResponseOutput> ConfigTrialProcessInfo(TrialProcessConfig trialConfig)
{
if (!await _trialRepository.Where(t => t.Id == trialConfig.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialState.TrialInitializing))
@@ -1078,7 +1081,7 @@ namespace IRaCIS.Core.Application
/// <returns></returns>
[HttpPut]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
public async Task<IResponseOutput> ConfigTrialUrgentInfo(TrialUrgentConfig trialConfig)
{
@@ -1113,7 +1116,7 @@ namespace IRaCIS.Core.Application
/// <param name="trialConfig"></param>
/// <returns></returns>
[HttpPut]
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
public async Task<IResponseOutput> ConfigTrialPACSInfo(TrialPACSConfig trialConfig)
{
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
@@ -1146,7 +1149,7 @@ namespace IRaCIS.Core.Application
[HttpPut("{trialId:guid}/{trialStatusStr}/{reason?}")]
[UnitOfWork]
//[Authorize(Policy = IRaCISPolicy.PM)]
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
public async Task<IResponseOutput> UpdateTrialState(Guid trialId, string trialStatusStr, string? reason)
{
@@ -1221,7 +1224,7 @@ namespace IRaCIS.Core.Application
/// <returns></returns>
[HttpPut("{trialId:guid}/{isAbandon:bool}")]
//[Authorize(Policy = IRaCISPolicy.PM)]
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
public async Task<IResponseOutput> AbandonTrial(Guid trialId, /*Guid? signId,*/ bool isAbandon)
{
@@ -1260,7 +1263,7 @@ namespace IRaCIS.Core.Application
/// <param name="trialConfig"></param>
/// <returns></returns>
[HttpPut]
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
//[TrialGlobalLimit( "AfterStopCannNotOpt" )]
public async Task<IResponseOutput> ConfigTrialTaskInfo(TrialTaskConfig trialConfig)
{
@@ -1278,7 +1281,7 @@ namespace IRaCIS.Core.Application
/// <param name="trialConfig"></param>
/// <returns></returns>
[HttpPut]
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
//[TrialGlobalLimit( "AfterStopCannNotOpt" )]
public async Task<IResponseOutput> ConfigTrialReadingTaskViewRule(TrialReadingTaskViewConfig trialConfig)
{
@@ -1290,14 +1293,22 @@ namespace IRaCIS.Core.Application
}
/// <summary>
/// 获取项目部位配置列表
/// </summary>
/// <param name="trialId"></param>
/// <returns></returns>
public async Task<IResponseOutput<List<TrialBodyPartView>>> GetTrialBodyPartList(Guid trialId)
{
var list = await _trialRepository.Where(t => t.Id == trialId).SelectMany(t => t.TrialBodyPartList).Select(t => new TrialBodyPartView() { Code = t.Code, Name = _userInfo.IsEn_Us ? t.Name : t.NameCN, Id = t.Id, IsHandAdd = t.IsHandAdd }).ToListAsync();
return ResponseOutput.Ok(list);
}
/// <summary>
/// 添加更新 项目部位配置
/// </summary>
/// <param name="incommand"></param>
/// <returns></returns>
public async Task<IResponseOutput> AddOrUpdateTrialBodyPart(AddOrUpdateTrialBodyPartCommand incommand)
{
@@ -1333,13 +1344,27 @@ namespace IRaCIS.Core.Application
}
/// <summary>
/// 获取项目额外配置
/// </summary>
/// <param name="trialId"></param>
/// <returns></returns>
public async Task<TrialExtraConfig> GetTrialExtralConfig(Guid trialId)
{
var extralConfig = _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialObjectNameList }).FirstOrDefault();
return JsonConvert.DeserializeObject<TrialExtraConfig>(extralConfig) ?? new TrialExtraConfig();
var extralConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(extralObj?.TrialExtraConfigJsonStr) ?? new TrialExtraConfig();
extralConfig.TrialObjectNameList = extralObj.TrialObjectNameList;
return extralConfig;
}
/// <summary>
/// 获取项目Pacs 配置
/// </summary>
/// <param name="trialId"></param>
/// <param name="optionsMonitor"></param>
/// <returns></returns>
public async Task<TrialPacsInfo> GetTrialPacsConfigInfo(Guid trialId, [FromServices] IOptionsMonitor<SystemPacsConfig> optionsMonitor)
{
var trialCode = await _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialCode).FirstOrDefaultAsync();
@@ -29,9 +29,13 @@ namespace IRaCIS.Application.Contracts
}
public class GetVisitStageListInDto:PageInput
{
public Guid TrialId { get; set; }
}
public class VisitPlanView
{
public List<VisitStageDTO> VisitPlanList = new List<VisitStageDTO>();
public PageOutput<VisitStageDTO> VisitPlanList { get; set; }
public decimal TimePointsPerPatient { get; set; }
public bool VisitPlanConfirmed { get; set; }
@@ -12,6 +12,6 @@ namespace IRaCIS.Application.Interfaces
Task<List<VisitPlanInfluenceSubjectVisitStatDTO>> GetInfluenceHistoryList(Guid trialId, [FromServices] IRepository<VisitPlanInfluenceStat> _influnceStatRepository);
Task<PageOutput<VisitStageDTO>> GetTrialVisitStageList(VisitPlanQueryDTO param);
Task<IEnumerable<VisitStageSelectDTO>> GetTrialVisitStageSelect(Guid trialId);
Task<VisitPlanView> GetVisitStageList(Guid trialId);
Task<VisitPlanView> GetVisitStageList(GetVisitStageListInDto inDto);
}
}
@@ -34,16 +34,23 @@ namespace IRaCIS.Core.Application.Service
}
/// <summary> 根据项目Id,获取项目访视计划(不分页)[New]</summary>
[HttpGet("{trialId:guid}")]
public async Task<VisitPlanView> GetVisitStageList(Guid trialId)
/// <summary>
/// 根据项目Id,获取项目访视计划
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<VisitPlanView> GetVisitStageList(GetVisitStageListInDto inDto)
{
var query = _visitStageRepository.AsQueryable(true).Where(u => u.TrialId == trialId)
var query = _visitStageRepository.AsQueryable(true).Where(u => u.TrialId == inDto.TrialId)
.ProjectTo<VisitStageDTO>(_mapper.ConfigurationProvider).OrderBy(t => t.VisitNum);
var list = await query.ToListAsync();
var trial = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId)).IfNullThrowException();
var list = await query.ToPagedListAsync(inDto);
var trial = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == inDto.TrialId)).IfNullThrowException();
var isHaveGeneratedTask = (await _visitTaskRepository.AnyAsync(t => t.TrialId == trialId));
var isHaveGeneratedTask = (await _visitTaskRepository.AnyAsync(t => t.TrialId == inDto.TrialId));
return new VisitPlanView()
{
VisitPlanList = list,
@@ -472,11 +472,13 @@ namespace IRaCIS.Core.Application.Service
IndicationTypeId= trial.IndicationTypeId,
ExperienceDataType = dataType,
TrialId = trial.Id,
OtherCriterion= item.CriterionType.GetEnumInt()=="0"? item.CriterionName:string.Empty,
VisitReadingCount = 0,
ExperienceCriteriaList = new List<TrialExperienceCriteria>() {
new TrialExperienceCriteria()
{
DoctorId=doctorId,
EvaluationCriteriaId=criterionTypeList.Where(x=>x.Code==item.CriterionType.GetEnumInt()).Select(x=>x.Id).FirstOrDefault()
}
}
@@ -26,4 +26,20 @@ namespace IRaCIS.Core.Application.Triggers
}
}
}
public class UserAddTrigger(IUserInfo _userInfo, IRepository<UserLog> _userLogReposiotry) : IBeforeSaveTrigger<User>
{
public async Task BeforeSave(ITriggerContext<User> context, CancellationToken cancellationToken)
{
var user = context.Entity;
if (context.ChangeType == ChangeType.Added)
{
await _userLogReposiotry.AddAsync(new UserLog() { OptType = UserOptType.AddUser, OptUserId = user.Id, LoginUserId = _userInfo.Id, IP = _userInfo.IP });
}
}
}
}
@@ -55,11 +55,9 @@ namespace IRaCIS.Core.Domain.Share
{
not_sys = 0,
//系统 不配置角色
sys_not_role = 1,
//系统
sys = 1
//系统需要配置角色的
sys_Config_role = 2
}
public enum FrontAudit
@@ -44,6 +44,8 @@ public enum UserOptType
MFALogin = 12,
MFALoginFail = 13,
AddUser = 14
}
[Description("影像下载打包状态")]
+8 -8
View File
@@ -466,17 +466,17 @@ namespace IRaCIS.Core.Domain.Share
DetailedTableOfInterReaderAnalysisResults = 6,
/// <summary>
/// 斑块表
/// </summary>
OCT_ReadingLession_Export = 7,
//访视一致率
VisitJudgeRatio_Export = 7,
VisitJudgeRatio_Export = 17,
//阅片期一致率
ReadingPeriodJudgeRatio_Export = 8,
SelfAnalysis = 9,
GroupAnalysis = 10
ReadingPeriodJudgeRatio_Export = 18,
}
@@ -41,46 +41,7 @@ namespace IRaCIS.Core.Domain.Share
}
public class TrialExtraConfig
{
#region MyRegion
//QC质控
public bool IsSupportQCDownloadImage { get; set; } = false;
#endregion
#region
public List<string> NotShowFieldList { get; set; } = new List<string>();
public List<SiteSurveyModifyFiled> ModifyFiledList { get; set; } = new List<SiteSurveyModifyFiled>();
#endregion
}
public class TrialPacsInfo
{
public int Port { get; set; }
public string Ip { get; set; }
public string TrialCalledAE { get; set; }
}
public class SiteSurveyModifyFiled
{
public string NeedModifyFiled { get; set; }
public string ReplaceContent { get; set; }
public string ReplaceContentCN { get; set; }
}
public enum DeclarationType
{
@@ -278,4 +278,7 @@ public class VisitTask : BaseFullAuditEntity
[Comment("前序任务需要签名 但是未签名")]
public bool IsFrontTaskNeedSignButNotSign { get; set; }
public int ImageStudyState { get; set; }
[Comment("通知IR加急阅片时间")]
public DateTime? ExpetidEmailNoticeTime { get; set; }
}
+69 -2
View File
@@ -23,10 +23,10 @@ public class EmailNoticeConfig : BaseFullDeleteAuditEntity
public string AttachPath { get; set; } = null!;
[Comment("业务级别")]
public int BusinessLevelEnum { get; set; }
public BusinessLevel BusinessLevelEnum { get; set; }
[Comment("业务模块")]
public int BusinessModuleEnum { get; set; }
public BusinessModule BusinessModuleEnum { get; set; }
[Comment("业务场景")]
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
@@ -83,3 +83,70 @@ public class EmailNoticeUserType : Entity
public EmailUserType EmailUserType { get; set; }
}
public enum BusinessLevel
{
Default=0,
System=1,
//需要手动添加到项目的邮件
Trial=2,
//项目默认发送的邮件,不需要手动添加到项目
TrialDefault=3
}
public enum BusinessModule
{
/// <summary>
/// 影像质控
/// </summary>
ImageQualityControl = 1,
/// <summary>
/// 影像阅片
/// </summary>
ImageReading = 2,
/// <summary>
/// 系统登录
/// </summary>
Login = 4,
/// <summary>
/// 后台邮件
/// </summary>
BackstageEmail = 5,
/// <summary>
/// 账号信息
/// </summary>
UserAccount = 6,
/// <summary>
/// 中心调研
/// </summary>
SiteSurvey = 7,
/// <summary>
/// 阅片人管理
/// </summary>
ReviewerManagement = 8,
/// <summary>
/// 问题反馈
/// </summary>
UsersSuggestions = 9,
/// <summary>
/// 入组确认
/// </summary>
EligibilityVerification = 10,
/// <summary>
/// PD确认
/// </summary>
PDVerification = 11,
/// <summary>
/// 医学反馈
/// </summary>
MedicalQC = 13,
/// <summary>
/// 入组/PD确认
/// </summary>
Eligibility_PDVerification = 12,
}
+11 -5
View File
@@ -89,6 +89,7 @@ public class Doctor : BaseFullAuditEntity
/// <summary>
/// GCP机构
/// </summary>
[MaxLength]
public string GCPAgencies { get; set; }
public Guid GCPId { get; set; }
@@ -167,39 +168,43 @@ public class Doctor : BaseFullAuditEntity
public Guid? SpecialityId { get; set; }
[MaxLength]
public string SpecialityOther { get; set; } = string.Empty;
[MaxLength]
public string SpecialityOtherCN { get; set; } = string.Empty;
[MaxLength]
public string SubspecialityOther { get; set; } = string.Empty;
[MaxLength]
public string SubspecialityOtherCN { get; set; } = string.Empty;
public string WeChat { get; set; } = string.Empty;
/// <summary>
/// 工作兼职
/// </summary>
[MaxLength]
public string WorkPartTime { get; set; } = string.Empty;
/// <summary>
/// 工作兼职En
/// </summary>
[MaxLength]
public string WorkPartTimeEn { get; set; } = string.Empty;
/// <summary>
/// 概述
/// </summary>
[MaxLength]
public string Summarize { get; set; } = string.Empty;
/// <summary>
/// 概述
/// </summary>
[MaxLength]
public string SummarizeEn { get; set; } = string.Empty;
@@ -211,6 +216,7 @@ public class Doctor : BaseFullAuditEntity
/// <summary>
/// 银行名称
/// </summary>
[MaxLength]
public string BankName { get; set; } = string.Empty;
/// <summary>
@@ -0,0 +1,46 @@
using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models;
[Comment("医生 - 概述")]
[Table("DoctorSummarize")]
public class DoctorSummarize : BaseFullAuditEntity
{
/// <summary>
/// 医生Id
/// </summary>
public Guid DoctorId { get; set; }
/// <summary>
/// 概述
/// </summary>
[MaxLength]
public string Summarize { get; set; } = string.Empty;
/// <summary>
/// 概述
/// </summary>
[MaxLength]
public string SummarizeEn { get; set; } = string.Empty;
/// <summary>
/// 是否是主模板
/// </summary>
public bool IsMain { get; set; }
/// <summary>
/// 适应症
/// </summary>
public string Indication { get; set; }
/// <summary>
/// 适应症
/// </summary>
public string IndicationEn { get; set; }
/// <summary>
/// 项目Id
/// </summary>
public Guid? TrialId { get; set; }
}
+3 -1
View File
@@ -5,7 +5,9 @@ namespace IRaCIS.Core.Domain.Models;
public class Postgraduate : BaseFullAuditEntity
{
#region
[JsonIgnore]
[ForeignKey("HospitalId")]
public Hospital HospitalEnt { get; set; }
#endregion
public Guid DoctorId { get; set; }
@@ -36,7 +36,7 @@ public class TrialEmailNoticeConfig : BaseFullDeleteAuditEntity
public int BusinessLevelEnum { get; set; }
public int BusinessModuleEnum { get; set; }
public BusinessModule BusinessModuleEnum { get; set; }
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
+1
View File
@@ -19,6 +19,7 @@ public class UserLog : BaseAddAuditEntity
public string LoginPassword { get; set; } = string.Empty;
public Guid? LoginUserId { get; set; }
[Comment("被操作的人,自己操作的就是自己")]
public Guid? OptUserId { get; set; }
public string IPRegion { get; set; } = string.Empty;
@@ -7,6 +7,11 @@ public class PreviousHistory : BaseAddAuditEntity
#region
[JsonIgnore]
public SubjectVisit SubjectVisit { get; set; }
[JsonIgnore]
[ForeignKey("ClinicalDataTrialSetId")]
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
#endregion
public DateTime? StartTime { get; set; }
@@ -8,6 +8,11 @@ public class PreviousOther : BaseAddAuditEntity
[JsonIgnore]
public SubjectVisit SubjectVisit { get; set; }
[JsonIgnore]
[ForeignKey("ClinicalDataTrialSetId")]
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
#endregion
public DateTime? StartTime { get; set; }
@@ -6,10 +6,14 @@ public class PreviousSurgery : BaseAddAuditEntity
{
#region
[JsonIgnore]
[ForeignKey("ClinicalDataTrialSetId")]
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
#endregion
public DateTime? OperationTime { get; set; }
public Guid SubjectVisitId { get; set; }
public bool IsSubjectLevel { get; set; }
@@ -87,7 +87,7 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
public string RelevanceValue { get; set; } = string.Empty;
[Comment("是否显示")]
public int ShowQuestion { get; set; }
public ShowQuestion ShowQuestion { get; set; }
[Comment("最大问题数")]
public int? MaxRowCount { get; set; }
@@ -90,7 +90,7 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
public string RelevanceValue { get; set; } = string.Empty;
public int ShowQuestion { get; set; }
public ShowQuestion ShowQuestion { get; set; }
public int? MaxRowCount { get; set; }
[Comment("图片数量")]
+16
View File
@@ -1,5 +1,6 @@
using IRaCIS.Core.Domain.Share;
using System.Linq;
using ZstdSharp.Unsafe;
namespace IRaCIS.Core.Domain.Models;
@@ -258,4 +259,19 @@ public partial class Trial : BaseFullDeleteAuditEntity
public bool IsPACSConnect { get; set; }
public bool IsTrialPACSConfirmed { get; set; }
[Comment("项目术语配置Json字符串")]
[StringLength(2000)]
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; }
}
[ComplexType]
public class TrialObjectNameConfig
{
public string Name { get; set; }
public string TrialName { get; set; }
public bool IsDefault { get; set; }
}
@@ -43,7 +43,9 @@ public class QCRepliedQCChallengeEvent : DomainEvent
public bool IsPd { get; set; }
public Guid QCChallengeDialogId { get; set; }
public Guid? QCChallengeDialogId { get; set; }
public Guid? QCChallengeId { get; set; }
public Guid TrialId { get; set; }
@@ -52,6 +54,8 @@ public class QCRepliedQCChallengeEvent : DomainEvent
}
/// <summary>
/// CRC 回复一致性核查质疑 通知PM
/// </summary>
@@ -2,7 +2,9 @@
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure.Encryption;
using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Newtonsoft.Json;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data;
@@ -59,11 +61,28 @@ public class IRaCISDBContext : DbContext
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<TestLength>(entity =>
{
// 使用部分加密值转换器,前 2 个字符不加密,方便模糊搜索
entity.Property(e => e.Name)
.HasConversion(new PartialEncryptionConverter(2));
entity.Property(e => e.Name).HasConversion(new PartialEncryptionConverter(2));
//entity.OwnsMany(x => x.TestJsonObjectLsit, ownedNavigationBuilder =>
//{
// ownedNavigationBuilder.ToJson();
//});
entity.Property(e => e.TestJsonObjectLsit).HasConversion(v => v == null ? "[]" : JsonConvert.SerializeObject(v),
v => string.IsNullOrEmpty(v) ? null : JsonConvert.DeserializeObject<List<TestJsonObject>>(v));
});
modelBuilder.Entity<Trial>(entity =>
{
//项目术语配置
entity.OwnsMany(x => x.TrialObjectNameList, ownedNavigationBuilder =>
{
ownedNavigationBuilder.ToJson() ;
});
});
#region pgsql codefirst
@@ -211,6 +230,8 @@ public class IRaCISDBContext : DbContext
public virtual DbSet<Dictionary> Dictionary { get; set; }
public virtual DbSet<Doctor> Doctor { get; set; }
public virtual DbSet<DoctorSummarize> DoctorSummarize { get; set; }
public virtual DbSet<DoctorCriterionFile> DoctorCriterionFile { get; set; }
public virtual DbSet<DoctorDictionary> DoctorDictionary { get; set; }
public virtual DbSet<Postgraduate> Postgraduate { get; set; }
@@ -558,7 +579,7 @@ public class IRaCISDBContext : DbContext
public virtual DbSet<TestLength> TestLength { get; set; }
public virtual DbSet<EventStoreRecord> EventStoreRecord { get; set; }
public virtual DbSet<EventStoreRecord> EventStoreRecord { get; set; }
@@ -567,6 +588,33 @@ public class IRaCISDBContext : DbContext
public class TestLength : Entity
{
public string Name { get; set; }
[StringLength(1000)]
public string[] StringList { get; set; }=new string[] { };
public List<DateTime> DateTimeList { get; set; } = new List<DateTime>();
[StringLength(1000)]
public List<TestEnum> TestEnumList { get; set; } = new List<TestEnum>();
public List<TestJsonObject> TestJsonObjectLsit { get; set; }
public DateOnly? TestDate { get; set; }
}
public record TestJsonObject
{
public string Name { get; set; }
public string Description { get; set; }
}
public enum TestEnum
{
Default = 0,
First = 1
}
@@ -82,7 +82,7 @@ public static class DBContext_Ext
originAuditState == AuditStateEnum.None && subjectVisit.AuditState == AuditStateEnum.ToAudit
)
{
subjectVisit.AddDomainEvent(new CRCSubmitedAndQCToAuditEvent() { SubjectVisitId = subjectVisit.Id,IsPd= subjectVisit.PDState == PDStateEnum.PDProgress });
subjectVisit.AddDomainEvent(new CRCSubmitedAndQCToAuditEvent() { SubjectVisitId = subjectVisit.Id, IsPd = subjectVisit.PDState == PDStateEnum.PDProgress });
}
//一致性核查通知PM发送邮件
@@ -96,11 +96,16 @@ public static class DBContext_Ext
{
var businessEnum = subjectVisit.IsEnrollmentConfirm ? EmailBusinessScenario.EligibilityVerification_PendingImageQC : EmailBusinessScenario.PDVerification_PendingImageQC;
var delaySeconds = dbContext.TrialEmailNoticeConfig.Where(t => t.BusinessScenarioEnum == businessEnum)
.Select(t => t.EmailDelaySeconds).FirstOrDefault();
var delaySeconds = dbContext.TrialEmailNoticeConfig.Where(t => t.TrialId==subjectVisit.TrialId && t.BusinessScenarioEnum == businessEnum)
.Select(t => t.EmailDelaySeconds).FirstOrDefault();
subjectVisit.AddDomainEvent(new QCClaimTaskEvent() { IsPd = subjectVisit.PDState == PDStateEnum.PDProgress, SubjectVisitId = subjectVisit.Id, DelaySeconds= delaySeconds, CurrentActionUserId = (Guid)subjectVisit.CurrentActionUserId });
Console.WriteLine("qc领取任务:" + DateTime.Now.ToShortTimeString() + $"延时{delaySeconds}");
if (delaySeconds > 0)
{
subjectVisit.AddDomainEvent(new QCClaimTaskEvent() { IsPd = subjectVisit.PDState == PDStateEnum.PDProgress, SubjectVisitId = subjectVisit.Id, DelaySeconds = delaySeconds, CurrentActionUserId = (Guid)subjectVisit.CurrentActionUserId });
}
}
@@ -110,6 +115,30 @@ public static class DBContext_Ext
}
foreach (var entry in changeTracker.Entries<QCChallenge>())
{
var qCChallenge = entry.Entity;
var findSubjectVisit = dbContext.SubjectVisit.Where(t => t.Id == qCChallenge.SubjectVisitId)
.Select(t => new { IsEnrollmentConfirm = t.IsEnrollmentConfirm, PDState = t.PDState, t.Id, t.TrialId }).FirstOrDefault().IfNullThrowException();
//入组或者PD 才执行下面的逻辑
if ((findSubjectVisit.IsEnrollmentConfirm || findSubjectVisit.PDState == PDStateEnum.PDProgress))
{
if (entry.State == EntityState.Added)
{
qCChallenge.AddDomainEvent(new QCRepliedQCChallengeEvent() { IsPd = findSubjectVisit.PDState == PDStateEnum.PDProgress,
QCChallengeId = qCChallenge.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
}
//添加进记录
eventStoreList.AddRange(GetStoreEvents(qCChallenge.DomainEvents));
}
}
foreach (var entry in changeTracker.Entries<QCChallengeDialog>())
{
var qCChallengeDialog = entry.Entity;
@@ -3,11 +3,14 @@ using IRaCIS.Core.Domain.BaseModel;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure.Extention;
using MassTransit;
using MassTransit.Mediator;
using MassTransit.Transports;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.Extensions.Logging;
using Microsoft.VisualBasic;
using System.Collections;
using System.Data;
@@ -75,9 +78,18 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
//.Where(x => !typeof(DataInspection).IsAssignableFrom(x.Entity.GetType()))
.ToList())
{
//foreach (var property in entry.Navigations.Where(t => typeof(IEnumerable).IsAssignableFrom(t.Metadata.ClrType) && t.Metadata.ClrType !=typeof(string) /*&& t.CurrentValue == null*/))
//{
// Console.WriteLine($"属性名{property.Metadata.Name} 现在值:{property.CurrentValue.ToJsonStr()}");
//}
// 检查属性是否为string类型,并且值为null
foreach (var property in entry.Properties.Where(t => t.Metadata.ClrType == typeof(string) && t.CurrentValue == null))
{
property.CurrentValue = string.Empty;
}
@@ -142,7 +154,8 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
var inspectionGeneralIdList = context.ChangeTracker.Entries().Where(t => typeof(DataInspection).IsAssignableFrom(t.Entity.GetType())).Select(t => ((DataInspection)t.Entity).GeneralId).ToList();
var entities = context.ChangeTracker.Entries().Where(u => (u.State == EntityState.Modified || u.State == EntityState.Deleted || u.State == EntityState.Added))
.Where(t => !typeof(DataInspection).IsAssignableFrom(t.Entity.GetType()) && !inspectionGeneralIdList.Contains(((Entity)t.Entity).Id))
.Where(t => !typeof(DataInspection).IsAssignableFrom(t.Entity.GetType()) && typeof(Entity).IsAssignableFrom(t.Entity.GetType())
&& !inspectionGeneralIdList.Contains(((Entity)t.Entity).Id))
.ToList();
AuditingData auditingData = new AuditingData((IRaCISDBContext)context, _userInfo);

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