Compare commits

..

184 Commits

Author SHA1 Message Date
xiaoguangbin
5719c210ca fix:自建台站beta分析 2024-08-22 11:19:29 +08:00
xiaoguangbin
356bd94a26 fix:修复新beta的保存接口执行非常慢的问题 2024-08-20 18:25:05 +08:00
nieziyan
af71f40b1c fix:格式化 2024-08-19 14:51:37 +08:00
nieziyan
0718701788 fix:分析工具核素弹窗 2024-08-15 14:18:24 +08:00
nieziyan
2693294331 fix:bug 2024-08-15 09:36:25 +08:00
nieziyan
6d2ec53b4c feat:comment接口 loadFromDB 2024-08-14 15:15:50 +08:00
xiaoguangbin
c0ba24aae4 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-08-09 15:54:58 +08:00
xiaoguangbin
a2e48e5b84 fix:修复新beta的保存接口执行非常慢的问题 2024-08-09 15:54:47 +08:00
nieziyan
8aeebe3047 feat:自建台站pekaInfomation 2024-08-09 09:17:55 +08:00
nieziyan
56e7c6adc5 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-08-08 09:41:19 +08:00
nieziyan
02083f93f5 feat:自建台站自动处理完善 2024-08-08 09:41:12 +08:00
xiaoguangbin
e266148da1 fix:修复新beta的分析接口,增加对roiParams的处理 2024-08-07 17:24:37 +08:00
xiaoguangbin
cd3d19db70 fix:修复新beta的分析接口,增加对roiParams的处理 2024-08-07 11:56:08 +08:00
xiaoguangbin
9a7cdbe1ed fix:修复新beta 保存到数据库失败问题 2024-08-06 18:46:46 +08:00
nieziyan
979f24a10c feat:自建台站view log 2024-08-06 18:23:21 +08:00
nieziyan
4ddf2f2b46 fix:自建台站viewRRR 2024-08-06 09:16:53 +08:00
nieziyan
f214f9fc97 fix:自建台站viewRRR 2024-08-06 09:11:31 +08:00
nieziyan
b7ae380fb1 fix:自建台站saveToDB报错 2024-08-05 09:25:01 +08:00
nieziyan
219b644669 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-08-02 16:36:09 +08:00
xiaoguangbin
aef513794b fix:修复新beta 保存到数据库失败问题 2024-08-02 16:35:25 +08:00
nieziyan
bead8100e7 Merge remote-tracking branch 'origin/SelfStation' into SelfStation
# Conflicts:
#	jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SelfStationServiceImpl.java
2024-08-02 15:43:42 +08:00
nieziyan
69e668a9a7 feat:自建台站报告 2024-08-02 15:37:30 +08:00
xiaoguangbin
441a4ee6f6 fix:修改 updateROI 更改其他谱失败问题 2024-08-01 19:02:58 +08:00
xiaoguangbin
8cac8a6099 feat:完善新beta savetodb接口 2024-08-01 17:34:33 +08:00
nieziyan
0aeb76d959 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-08-01 14:44:05 +08:00
nieziyan
ba17537b44 fix:betaEnergyData null 2024-08-01 14:43:57 +08:00
xiaoguangbin
135f4ebd21 fix: 新beta谱 savetodb接口修改返回结果 2024-08-01 11:04:41 +08:00
nieziyan
dc3375a5ab Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-08-01 10:41:40 +08:00
nieziyan
6f9e33e48b feat:自建台站saveToDB 2024-08-01 10:41:31 +08:00
xiaoguangbin
ddbb632492 fix: 新beta谱 savetodb接口修改返回结果 2024-07-31 18:54:54 +08:00
nieziyan
164e44d086 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-31 18:23:38 +08:00
nieziyan
b48cf5a991 feat:自建台站loadFromDB 2024-07-31 18:23:32 +08:00
xiaoguangbin
19c9bae348 feat:补充beta 分析部分接口 2024-07-31 17:29:39 +08:00
nieziyan
40e94299a7 fix:自建台站saveToDB 2024-07-31 10:38:20 +08:00
nieziyan
b19f5087ed Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-30 13:58:33 +08:00
nieziyan
6bb4cb67a1 fix:自建台站分析参数 2024-07-30 13:58:16 +08:00
xiaoguangbin
c6ea38f2d3 feat:viewBeta calibration补充gamma energy 转化 channel公式 2024-07-30 10:44:29 +08:00
xiaoguangbin
7c5ffb4cf2 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-29 19:34:44 +08:00
xiaoguangbin
f905f9951d feat:beta energy calibration通过b_energy数据重新拟合一条初始beta曲线 2024-07-29 19:34:25 +08:00
nieziyan
bc74b2e32e feat:自建台站SaveToDB 2024-07-29 19:30:17 +08:00
nieziyan
48fc1b30e5 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-26 19:16:00 +08:00
nieziyan
01ea4f8c63 feat:自建台站交互分析 2024-07-26 19:15:46 +08:00
xiaoguangbin
cf369218da fix: self:1.nuclideReview弹窗多个接口;2.解决分析之后 gamma三个calibration弹窗无数据问题 2024-07-26 10:49:18 +08:00
xiaoguangbin
0cd2e0f29c Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-25 17:06:44 +08:00
xiaoguangbin
c83aff08bd feat:selfStationController 增加 replotBaseLine、acceptBaseLine 接口 2024-07-25 17:06:23 +08:00
xiaoguangbin
da269b1da1 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-25 17:05:40 +08:00
xiaoguangbin
9726c51710 feat:selfStationController 增加 replotBaseLine、acceptBaseLine 接口 2024-07-25 17:05:14 +08:00
xiaoguangbin
71411c8d4c Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-25 14:35:52 +08:00
xiaoguangbin
511afb8677 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-25 14:35:13 +08:00
xiaoguangbin
50c70d7026 feat:selfStationController 增加 resetButton 接口 2024-07-25 14:34:44 +08:00
nieziyan
82ebe1009e Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-25 14:28:59 +08:00
nieziyan
2e0814fa14 feat:自建台站自动处理分析结果存库 2024-07-25 14:28:50 +08:00
xiaoguangbin
e11eee19f7 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-25 14:26:28 +08:00
xiaoguangbin
566657c339 fix:beta calibration table数据 2024-07-25 14:24:51 +08:00
xiaoguangbin
2e08948302 fix:如何初始时获取beta calibration table数据 2024-07-25 11:13:29 +08:00
xiaoguangbin
79063e235a Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-24 17:16:24 +08:00
xiaoguangbin
d64a0be200 fix:修改updateROI接口参数 2024-07-24 17:15:56 +08:00
xiaoguangbin
9f7295673d Revert "fix:修改updateROI接口参数"
This reverts commit aa99d7214b758f166c6460d976ec0f1cb652777c.
2024-07-24 17:13:16 +08:00
xiaoguangbin
aa99d7214b fix:修改updateROI接口参数 2024-07-24 17:12:44 +08:00
xiaoguangbin
73286710e0 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-24 16:47:04 +08:00
xiaoguangbin
1f94e14a70 fix:修改updateROI接口参数;2 增加/selfStation/getGammaGated接口 2024-07-24 16:46:44 +08:00
xiaoguangbin
48a03b6d6f fix:修改updateROI接口参数;2 增加/selfStation/getGammaGated接口 2024-07-24 16:46:30 +08:00
xiaoguangbin
f4aef9bdee Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-24 15:42:21 +08:00
nieziyan
970d4f3027 feat:自建台站谱解析 2024-07-23 16:49:11 +08:00
xiaoguangbin
8869735270 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-23 09:33:30 +08:00
nieziyan
dee89d28b5 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-23 09:17:06 +08:00
xiaoguangbin
1e830b0392 fix:修改updateROI接口参数 2024-07-23 08:45:32 +08:00
nieziyan
61ecc0ea5c Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-22 19:09:17 +08:00
nieziyan
95116338ad feat:自建台站谱解析类 2024-07-22 19:09:04 +08:00
xiaoguangbin
755f36d012 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-22 18:37:39 +08:00
xiaoguangbin
0af17e0601 fix:修改updateROI接口参数 2024-07-22 18:36:05 +08:00
nieziyan
7cd16a77c2 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-22 15:59:11 +08:00
nieziyan
7daebd98b8 feat:自建台站谱解析类 2024-07-22 15:59:04 +08:00
xiaoguangbin
567b64a34e fix:增加mdcInfoMap-C 2024-07-22 15:56:38 +08:00
xiaoguangbin
793d767313 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-22 14:10:01 +08:00
xiaoguangbin
cb74fb5a9e Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-19 17:15:00 +08:00
xiaoguangbin
2a6a38c286 fix:修改新beta谱的gamma reprocessing接口 2024-07-19 17:14:47 +08:00
nieziyan
108f2db587 feat:自建台站AUX表增加GPS信息 2024-07-19 16:11:10 +08:00
xiaoguangbin
90ecbfe99b Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-19 15:34:23 +08:00
nieziyan
55b14e66b6 feat:自建台站新增viewSpectrum接口 2024-07-19 11:21:32 +08:00
xiaoguangbin
fa79e380dd Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-19 09:44:11 +08:00
xiaoguangbin
f2d211b2b2 fix:beta energy calibration 中qc谱散点数据调整 2024-07-19 09:20:32 +08:00
nieziyan
5849612a3b feat:bgSpectrum数据 2024-07-18 19:43:26 +08:00
xiaoguangbin
3d97ffb539 fix:增加interactive弹窗内的接口 2024-07-18 18:45:05 +08:00
nieziyan
b5d4b23f3c feat:自建台站增加Configure接口 2024-07-18 18:16:59 +08:00
nieziyan
3c02c89ae5 feat:自建台站增加用户核素库配置接口 2024-07-18 09:06:49 +08:00
xiaoguangbin
16a1407216 fix:新beta 增加fitting接口 2024-07-17 14:33:04 +08:00
xiaoguangbin
143e1b1092 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-17 10:32:22 +08:00
xiaoguangbin
5b94121112 fix: 2024-07-17 10:31:58 +08:00
xiaoguangbin
5c0f09c616 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-07-17 10:28:59 +08:00
xiaoguangbin
03d92b7889 fix:1。增加qc文件;2.增加交互分析(gamma) 2024-07-17 09:53:43 +08:00
xiaoguangbin
9bbdd5eb5d fix:FileNameByStandardForm使用ftp改为本地目录 2024-07-17 09:49:56 +08:00
xiaoguangbin
277485ddda Merge remote-tracking branch 'origin/SelfStation' into SelfStation
# Conflicts:
#	jeecg-boot-base-core/src/main/java/org/jeecg/common/email/EmailServiceManager.java
2024-07-16 14:35:57 +08:00
xiaoguangbin
2e10465bfe fix:1.修改roi卡gamma数据代码,改为两个x点卡数据;
2.点击分析按钮根据卡出来的数据生成gammaPHD文件
2024-07-16 14:34:34 +08:00
xiaoguangbin
5a8f20362a fix:from file 读取ftp功能改为直接访问ftp文件夹目录获取文件 2024-07-16 14:30:36 +08:00
xiaoguangbin
c64079e1f1 Merge remote-tracking branch 'origin/noFtp-seflStation' into SelfStation
# Conflicts:
#	jeecg-boot-base-core/src/main/java/org/jeecg/common/email/EmailServiceManager.java
2024-07-16 12:02:26 +08:00
xiaoguangbin
f4b05e2da1 fix:修改ftp切换的目录 2024-07-16 11:55:10 +08:00
nieziyan
3f22b0edba fix:Bugs 2024-07-08 10:03:25 +08:00
xiaoguangbin
ebdf8d863a fix:增加海水系统和自建台站beta的系统类型 2024-06-26 15:42:08 +08:00
xiaoguangbin
80985a74d7 Merge remote-tracking branch 'refs/remotes/origin/SelfStation' into noFtp-seflStation
# Conflicts:
#	jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/DictConstant.java
#	jeecg-boot-base-core/src/main/java/org/jeecg/common/email/EmailServiceManager.java
#	jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/controller/CalculateConcController.java
#	jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/redisStream/AnalysisConsumer.java
#	jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java
#	jeecg-module-auto-process/src/main/java/org/jeecg/modules/EmailParsingActuator.java
#	jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/AbstractSpectrumHandler.java
#	jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumParsingActuator.java
#	jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java
#	jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java
#	jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java
#	jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/GardsSampleDataServiceImpl.java
2024-06-26 10:43:45 +08:00
xiaoguangbin
0a560452bf Merge remote-tracking branch 'refs/remotes/origin/sleepDownload' into noFtp-seflStation
# Conflicts:
#	jeecg-boot-base-core/src/main/java/org/jeecg/common/email/EmailServiceManager.java
#	jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java
#	jeecg-module-auto-process/src/main/java/org/jeecg/modules/EmailParsingActuator.java
2024-06-26 10:06:41 +08:00
xiaoguangbin
f6b963145f fix:增加catch中exception写入log日志 2024-06-25 11:03:09 +08:00
nieziyan
8b40646076 feat:Application异常结束退出 2024-06-19 16:33:55 +08:00
nieziyan
cf0751109d feat:添加IDC数据源控制访问 2024-06-18 14:52:44 +08:00
nieziyan
64a98bd4ea fix:邮件接收超时时间 2024-06-12 15:33:23 +08:00
nieziyan
f1410028fa fix:不删除saveFile下谱文件 2024-06-06 16:51:24 +08:00
nieziyan
d5dce1c3fc feat:探测器报警信息 2024-06-04 09:52:58 +08:00
nieziyan
e83c1d6199 feat:探测器报警信息 2024-06-04 09:47:58 +08:00
nieziyan
86968e383b fix:删除多余文件 2024-05-13 14:58:41 +08:00
qiaoqinzheng
9fffd2436c 自动处理模块模块同步代码 2024-05-13 14:14:01 +08:00
qiaoqinzheng
2407b65a06 自动处理模块下载邮件代码修改 2024-05-13 14:09:42 +08:00
qiaoqinzheng
6c5a0bf546 人工交互模块BetaDataFile实体类增加detectorId字段用于报警使用 2024-05-13 09:24:25 +08:00
qiaoqinzheng
caf47a58d5 人工交互模块增加判断如果不是正常谱提示异常信息内容 2024-05-10 16:12:26 +08:00
qiaoqinzheng
600c5235ec 自建台站分支同步代码 2024-04-30 11:51:54 +08:00
qiaoqinzheng
3a1567f853 自建台站分支初始化数据返回值关键字改为void 2024-04-26 11:25:27 +08:00
nieziyan
18b495d1d0 Merge remote-tracking branch 'origin/noFtp' into noFtp 2024-04-25 15:05:45 +08:00
nieziyan
6335a3f588 fix:修改FTP为本地文件 2024-04-24 09:34:59 +08:00
nieziyan
d5b18e57b5 fix:增加排序 2024-04-11 14:51:57 +08:00
nieziyan
14e64306b2 Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-04-10 19:10:14 +08:00
nieziyan
0c8019ad15 feat:修改是否对文件内容解码逻辑 2024-04-10 19:09:32 +08:00
qiaoqinzheng
d92d55befc 自动处理模块GPS谱流程代码修改 2024-04-10 12:40:14 +08:00
qiaoqinzheng
fc4623e584 自动处理模块GPS谱流程代码修改 2024-04-10 11:31:27 +08:00
qiaoqinzheng
8d3b380837 自动处理模块service配置类增加GPS基础数据相关service实体 2024-04-10 09:13:56 +08:00
nieziyan
eedcd67113 feat:报警编码内容替换 2024-04-09 18:19:37 +08:00
nieziyan
4c16d4527d feat:报警编码信息管理 2024-04-08 18:35:24 +08:00
nieziyan
2d840bcd8b feat:解码Base64邮件内容保存为可处理.eml文件 2024-04-03 16:46:34 +08:00
qiaoqinzheng
5c181d60b1 同步mdc分支代码 2024-03-21 10:29:47 +08:00
qiaoqinzheng
bde5eed237 同步mdc分支代码 2024-03-21 10:28:04 +08:00
qiaoqinzheng
1c34f3dde1 app端代码同步 2024-02-29 10:50:41 +08:00
qiaoqinzheng
8b9882842f 人工交互模块beta存储公式参数问题修改 2024-02-02 17:04:58 +08:00
qiaoqinzheng
19b0366ace 存储谱数据到数据库时,生成的临时日志,报告文件进行删除 2024-02-02 09:31:01 +08:00
qiaoqinzheng
b6bad77274 消息推送OPPO,VIVO增加厂商配置参数 2024-01-31 17:51:11 +08:00
qiaoqinzheng
c892a339e0 增加客户绑定的客户端id去重,避免同一个用户发送多条的情况 2024-01-31 16:00:28 +08:00
qiaoqinzheng
9e8935c9d4 新增推送通知基础配置类MyApiHelper
新增推送通知工具类PushAppUtil
增加在线,离线推送消息相关方法
消息推送根据报警规则组id,获取绑定用户id,根据用户id查询绑定的客户端id推送消息
新增表绑定用户以及客户端信息
app登陆增加新的redisKey存储当前用户名对应的token信息,在别处登陆时清除上一个登陆token退出用户登陆
新增接口用户在app端登陆时,新增或修改当前用户id绑定的客户端id
定时任务增加推送通知工具类声明
分析结果消费者代码增加推送通知工具类
2024-01-31 15:25:15 +08:00
nieziyan
9107cdf13e Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-01-30 11:52:16 +08:00
nieziyan
01eb8d22c2 fix:send message 2024-01-30 11:51:34 +08:00
qiaoqinzheng
412d7e74d9 拼接文件路径,在ftp目录路径及ftp文件夹路径间多拼接路径符号问题修改
同步mdc修改
2024-01-29 14:21:21 +08:00
qiaoqinzheng
6a65d9cdd6 上传文件重命名内容修改 2024-01-29 13:41:28 +08:00
nieziyan
7af7fafc86 Merge branch 'mdc' into SelfStation
# Conflicts:
#	jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumServiceQuotes.java
#	jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsNuclLibMapper.java
#	jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java
#	jeecg-module-station-operation/src/main/java/org/jeecg/DataReceivingStatusManager.java
2024-01-26 17:00:07 +08:00
qiaoqinzheng
dac0736e72 查询统计核素信息接口增加对数据是inf,nan的数据赋值空值处理 2024-01-26 16:48:46 +08:00
qiaoqinzheng
c62b55913a 数据库加载增加判断analysisId条件 2024-01-26 15:27:10 +08:00
qiaoqinzheng
071e9690c6 自建台站新增initValue方法
自建台站新增暂时数据库加载数据方法
2024-01-26 15:21:34 +08:00
qiaoqinzheng
a730178204 新增加GPS谱数据的内容解析及保存 2024-01-26 10:39:59 +08:00
qiaoqinzheng
cf2fe9dd8e 自动处理错误谱文件修改名称方法内容修改 2024-01-26 10:38:55 +08:00
qiaoqinzheng
39348f16f3 自动处理文件名称重命名错误问题修改 2024-01-25 14:15:04 +08:00
qiaoqinzheng
8c5f85b499 查询统计核素方法新增标识判断是否已经存储过当前日期
查询统计核素方法返回内容移除全日期数据
2024-01-24 18:06:02 +08:00
qiaoqinzheng
e3e8a52344 台站运行管理台站接收状态线程台站id数组获取内容修改 2024-01-24 16:45:08 +08:00
qiaoqinzheng
a2ff824fc7 台站运行管理启动时增加查询所有用户最大缓存时间的方法
台站运行管理查询台站的运行状态接口根据用户设置的缓存时间进行结果切割返回
系统启动类新增加缓存台站id及台站id关联的探测器数组方法
台站运行管理数据状态线程向redis缓存过于频繁导致触发redis序列化错误问题修改
2024-01-24 14:12:14 +08:00
qiaoqinzheng
1aa68d4974 采集时间日期截取下标位置错误导致匹配失败问题修改 2024-01-23 19:42:56 +08:00
qiaoqinzheng
a6deb7c53f 新增获取时间范围内年月日小时的方法
统计横坐标根据时间范围内的年月日小时填充数据并回显
2024-01-23 19:24:23 +08:00
qiaoqinzheng
229d1980dd 台站运行管理初始化台站运行状态,台站运行效率新增过滤台站状态条件 2024-01-23 15:33:41 +08:00
qiaoqinzheng
f7677e56e2 同步mdc 2024-01-23 15:13:57 +08:00
qiaoqinzheng
35ac1ebf0c Merge remote-tracking branch 'origin/SelfStation' into SelfStation 2024-01-23 15:03:29 +08:00
qiaoqinzheng
5498e0e433 同步mdc 2024-01-23 15:03:21 +08:00
nieziyan
cc3c056bcf fix:findAutoPage增加参数sampleType 2024-01-23 14:20:45 +08:00
qiaoqinzheng
630bc4ee4f 探测器状态判断改为调用枚举类内容 2024-01-23 09:02:26 +08:00
qiaoqinzheng
d611bf1ff1 人工交互beta,gamma上传文件后删除本地文件操作移除 2024-01-23 08:55:08 +08:00
qiaoqinzheng
49dee87eed 同步mdc 2024-01-22 14:08:37 +08:00
qiaoqinzheng
d8e980fdb2 统计分析导出核素对比统计数据功能实现 2024-01-22 13:47:12 +08:00
qiaoqinzheng
680c263033 人工交互分析gamma部分baseline,lc,scac文件上传到ftp代码实现 2024-01-18 18:58:00 +08:00
qiaoqinzheng
90684089a1 人工交互存储gamma分析结果mdc数据如果已经存在数据需要删除对应的mdc结果后重新插入 2024-01-18 18:37:39 +08:00
qiaoqinzheng
df15a907e9 同步分支mdc 2024-01-18 17:50:52 +08:00
qiaoqinzheng
2f1f658d33 新增动态生成excel内容方法 2024-01-18 17:44:43 +08:00
qiaoqinzheng
b7c0553239 人工交互分析报告存放地址改为Rrr文件夹与Arr区分开 2024-01-18 14:06:19 +08:00
qiaoqinzheng
0d4deaf403 人工交互分析beta日志文件没有创建导致无法上传的问题修改 2024-01-18 11:43:23 +08:00
qiaoqinzheng
e159740d76 人工交互模块增加beta部分日志文件的存在情况判断,上传后的日志文件不进行删除 2024-01-18 10:35:56 +08:00
qiaoqinzheng
82713a8795 自建台站新增实体类存储公用的数据内容
自建台站返回内容增加det相关数据
web模块增加查询系统类型对应的配置核素信息
web模块增加查询系统类型对应的核素统计信息
人工交互模块增加beta部分日志文件的存在情况判断,上传后的日志文件不进行删除
2024-01-18 10:33:07 +08:00
qiaoqinzheng
ee2dd272d1 自建台站折线图ROI范围计算结果取值下标计算公式参数问题修改 2024-01-17 16:24:17 +08:00
qiaoqinzheng
9f8e79226e 台站运行管理查询台站,核设施列表排序问题修改,台站内容放置在核设施前并分别排序 2024-01-17 14:02:09 +08:00
qiaoqinzheng
1452be8f31 MDC分析结果存储改为字符串格式与数据库格式匹配 2024-01-16 19:01:08 +08:00
qiaoqinzheng
e33fc8df83 自建台站修改ROI返回接口改为put请求
自建台站实体类去掉多余参数
2024-01-16 17:08:50 +08:00
qiaoqinzheng
d1de32433e 自建台站已经加载过的数据再次加载页面数据丢失问题修改
人工交互beta保存日志路径,报告路径sql代码
2024-01-16 09:35:30 +08:00
qiaoqinzheng
eb3605d9e8 名称格式化文件增加beta使用的名称格式化方法 2024-01-15 19:32:39 +08:00
qiaoqinzheng
55f9cd49e1 人工交互beta,gamma存储并上传日志,报告文件 2024-01-15 19:30:07 +08:00
qiaoqinzheng
76acc20a7d 新增加自建台站系统类型判断,根据sample文件名称可以通过系统类型查询到关联的det文件类型
新增加查询台站运行轨迹方法
2024-01-15 19:23:43 +08:00
qiaoqinzheng
84d6c4a5a2 自动处理SOH,MET文件存储内容中如果是占位数据-999999存储时数据内容超出精度范围问题修改 2024-01-15 10:44:03 +08:00
qiaoqinzheng
16f59f0273 人工交互,自动处理启动时查询全核素信息方法修改 2024-01-12 15:56:16 +08:00
qiaoqinzheng
63576edde8 探测器新增代码同步 2024-01-11 18:26:12 +08:00
qiaoqinzheng
03955c3691 自建台站散点图G,B横纵坐标取值修改 2024-01-11 09:34:58 +08:00
qiaoqinzheng
8faa97d8f1 gamma分析部分生成报告内容中关于version描述区分颗粒物和气体
增加人工交互,自动处理启动时加载全核素信息方法
人工交互,自动处理启动时加载全核素信息方法调用接口类方法修改
2024-01-11 09:00:48 +08:00
qiaoqinzheng
3c4aae44e0 散点图B,G位置颠倒问题修改 2024-01-10 18:30:24 +08:00
qiaoqinzheng
ee3a04af2f 新增删除自建台站缓存接口 2024-01-10 15:47:15 +08:00
qiaoqinzheng
941c6c0685 ftp路径前多拼接了/导致文件找不到 2024-01-10 15:32:16 +08:00
qiaoqinzheng
cadbdb3ba9 人工交互新增自建台站相关实体类对象
人工交互新增自建台站管理代码
人工交互新增自建台站数据缓存对象
人工交互新增自建台站工具类
2024-01-10 11:40:50 +08:00
550 changed files with 24114 additions and 51671 deletions

View File

@ -124,6 +124,13 @@
<version>${mysql-connector-java.version}</version>
<scope>runtime</scope>
</dependency>
<!-- sqlserver-->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>${sqljdbc4.version}</version>
<scope>runtime</scope>
</dependency>
<!-- oracle驱动 -->
<dependency>
<groupId>com.oracle</groupId>

View File

@ -4,63 +4,22 @@ public interface DBSQL {
/* PostgreSQL */
String DBNAMES_PG = "SELECT datname FROM pg_database WHERE datistemplate = false";
String DBINFO_PG =
"SELECT schemaname|| '.' || relname AS tableName, 0 AS numRow, 0.0 AS used," +
"ROUND( pg_relation_size ( relid ) / ( 1024 * 1024 ), 2 ) AS dataSize," +
"ROUND( pg_indexes_size ( relid ) / ( 1024 * 1024 ), 2 ) AS indexSize " +
"FROM pg_stat_user_tables ";
String DBROWNUM_PG = "SELECT \n" +
" n.nspname|| '.' || c.relname AS tableName, \n" +
" c.reltuples AS numRow,\n" +
" 0.0 AS used, \n" +
" 0.0 AS dataSize, \n" +
" 0.0 AS indexSize\n" +
"FROM pg_class c\n" +
"JOIN pg_namespace n ON c.relnamespace = n.oid\n" +
"WHERE c.relkind = 'r' \n" +
" AND n.nspname NOT IN ('pg_catalog', 'information_schema') -- 过滤系统模式\n" +
" AND c.relname NOT LIKE 'pg_%' \n" +
" AND c.relname NOT LIKE 'sql_%'";
String SPACE_PG = "SELECT \n" +
" ts.spcname AS spaceName,\n" +
" ROUND(pg_tablespace_size(ts.oid) / 1024.0 / 1024, 2) AS total,\n" +
" ROUND((pg_tablespace_size(ts.oid) - \n" +
" COALESCE(SUM(pg_relation_size(c.oid)), 0)) / 1024.0 / 1024, 2) AS free,\n" +
" ROUND(COALESCE(SUM(pg_relation_size(c.oid)), 0) / 1024.0 / 1024, 2) AS usage,\n" +
" ROUND(COALESCE(SUM(pg_relation_size(c.oid)), 0) * 100.0 / \n" +
" NULLIF(pg_tablespace_size(ts.oid), 0), 2) AS used\n" +
"FROM pg_tablespace ts\n" +
"LEFT JOIN pg_class c ON c.reltablespace = ts.oid\n" +
"WHERE ts.spcname NOT IN ('pg_global')\n" +
"GROUP BY ts.oid, ts.spcname\n" +
"ORDER BY total DESC;";
String tablespaceLocation = " SELECT\n" +
" spcname AS space_name,\n" +
" CASE\n" +
" WHEN pg_tablespace_location (OID) = ''\n" +
" OR pg_tablespace_location (OID) IS NULL THEN\n" +
" current_setting ('data_directory')\n" +
" ELSE\n" +
" pg_tablespace_location (OID)\n" +
" END AS location_path\n" +
" FROM\n" +
" pg_tablespace\n" +
" WHERE\n" +
" spcname NOT IN ('pg_global')";
String DBINFO_PG = "SELECT relname AS tableName, 0 AS numRow, 0.0 AS used," +
"ROUND( pg_relation_size ( relid ) / ( 1024 * 1024 ), 2 ) AS dataSize," +
"ROUND( pg_indexes_size ( relid ) / ( 1024 * 1024 ), 2 ) AS indexSize " +
"FROM pg_stat_user_tables WHERE schemaname = 'public'";
String DBROWNUM_PG = "SELECT relname AS tableName, reltuples AS numRow," +
"0.0 AS used, 0.0 AS dataSize, 0.0 AS indexSize " +
"FROM pg_class WHERE relkind = 'r' AND relname NOT LIKE 'pg_%' AND relname NOT LIKE 'sql_%'";
String DBSTATUS_PG = "SELECT *, 0 AS logResidue FROM " +
"(SELECT COUNT(*) AS loginNum FROM pg_stat_activity WHERE query_start >= now() - interval '1 minute') AS loginNum," +
"(SELECT COUNT(*) AS connNum FROM pg_stat_activity WHERE query_start >= now() - interval '1 minute') AS connNum," +
"(SELECT ROUND(SUM(pg_database_size(datname)) / 1024 / 1024, 0) AS dataSize FROM pg_database) AS dataSize";
String DBSTATUS_CONN_PG =
"SELECT COUNT(*) FROM pg_stat_activity WHERE query_start >= now() - interval '1 minute'";
String DBSTATUS_CONN_PG = "SELECT COUNT(*) FROM pg_stat_activity WHERE query_start >= now() - interval '1 minute'";
String DBSTATUS_DATASIZE_PG =
"SELECT ROUND(SUM(pg_database_size(datname)) / 1024 / 1024, 0) FROM pg_database";
String DBSTATUS_DATASIZE_PG = "SELECT ROUND(SUM(pg_database_size(datname)) / 1024 / 1024, 0) FROM pg_database";
/* Oracle */
String DBNAMES_OR = "SELECT username FROM all_users";
@ -95,11 +54,9 @@ public interface DBSQL {
"(SELECT SUM(BYTES) / 1024 / 1024 AS logResidue FROM V$log WHERE ARCHIVED = 'NO')," +
"(SELECT SUM(BYTES) / 1024 / 1024 AS dataSize FROM dba_data_files)";
String DBSTATUS_CONN_OR =
"SELECT COUNT(*) FROM V$SESSION WHERE LOGON_TIME >= SYSDATE - 1 / 24 / 60";
String DBSTATUS_CONN_OR = "SELECT COUNT(*) FROM V$SESSION WHERE LOGON_TIME >= SYSDATE - 1 / 24 / 60";
String DBSTATUS_LOGRESIDUE_OR =
"SELECT SUM(BYTES) / 1024 / 1024 FROM V$log WHERE ARCHIVED = 'NO'";
String DBSTATUS_LOGRESIDUE_OR = "SELECT SUM(BYTES) / 1024 / 1024 FROM V$log WHERE ARCHIVED = 'NO'";
String DBSTATUS_DATASIZE_OR = "SELECT SUM(BYTES) / 1024 / 1024 AS dataSize FROM dba_data_files";

View File

@ -41,13 +41,6 @@ public interface RedisConstant {
String EMAIL_MSG_ID = "email_msg_id";
String UNDEAL_FILE = "Undeal:";
//自动分析等级
String AUTO_CAT = "Stream:AutoCat";
String GROUP_AutoCat = "Group_AutoCat";
String AUTO_CONSUMER = "AutoCat_Consumer";
//人工交互等级
String CATEGORY = "Stream:Category";
String GROUP_Category = "Group_Category";
String CATEGORY_CONSUMER = "Category_Consumer";
String SELF_PARAMETER = "self_parameter";
String SELF_PARAMETER = "self_parameter";
}

View File

@ -0,0 +1,8 @@
package org.jeecg.common.constant;
public class SelfStationConstant {
public static final String ROI1 = "ROI1";
public static final String ROI2 = "ROI2";
public static final String ROI3 = "ROI3";
public static final String ROI4 = "ROI4";
}

View File

@ -1,17 +1,11 @@
package org.jeecg.common.email;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.collect.Lists;
import com.sun.mail.imap.IMAPStore;
import com.sun.mail.pop3.POP3Folder;
import com.sun.mail.smtp.SMTPAddressFailedException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.api.dto.message.MessageDTO;
import org.jeecg.common.constant.RedisConstant;
@ -25,7 +19,6 @@ import org.jeecg.common.util.DateUtils;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.base.entity.postgre.SysEmail;
import org.jetbrains.annotations.NotNull;
import javax.mail.*;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
@ -36,9 +29,7 @@ import javax.mail.search.SearchTerm;
import java.io.*;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.file.Files;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;
@ -62,25 +53,15 @@ public class EmailServiceManager {
* 系统启动时间
*/
private Date systemStartupTime;
/**
* 邮件接收数量
*/
/** 邮件接收数量 */
private Integer receiveNum;
/**
* smtp协议的存储对象
*/
//private IMAPStore store = null;
private Store store = null;
/**
* 邮件附件临时存储路径
*/
/** smtp协议的存储对象 */
private IMAPStore store = null;
/** 邮件附件临时存储路径 */
private String temporaryStoragePath;
/**
* 收件箱
*/
/** 收件箱 */
private Folder folder = null;
// 判断协议类型
private String protocol;
private RedisUtil redisUtil;
private Object downloadEmlLocal = new Object();
@ -88,27 +69,25 @@ public class EmailServiceManager {
private final ReentrantLock lock = new ReentrantLock();
@NotNull
public static EmailServiceManager getInstance() {
public static EmailServiceManager getInstance(){
return new EmailServiceManager();
}
/**
* 初始化邮件服务管理器
*
* @param email 邮件属性
*/
public void init(SysEmail email) {
public void init(SysEmail email){
this.email = email;
}
/**
* 初始化邮件服务管理器
*
* @param email 邮件属性
*/
public void init(SysEmail email, Integer receiveNum, String temporaryStoragePath,
Date systemStartupTime, SpectrumPathProperties pathProperties, TaskProperties taskProperties,
RedisUtil redisUtil) {
Date systemStartupTime, SpectrumPathProperties pathProperties,TaskProperties taskProperties,
RedisUtil redisUtil){
this.email = email;
this.receiveNum = receiveNum;
this.temporaryStoragePath = temporaryStoragePath;
@ -121,18 +100,18 @@ public class EmailServiceManager {
/**
* 测试邮件服务连通性
*/
public boolean testConnectEmailServer() {
public boolean testConnectEmailServer(){
Socket socket = new Socket();
boolean flag = false;
try {
socket.connect(new InetSocketAddress(email.getEmailServerAddress(), email.getPort()), 3000);
log.info("{}邮件服务连接测试成功", email.getName());
socket.connect(new InetSocketAddress(email.getEmailServerAddress(),email.getPort()),3000);
log.info("{}邮件服务连接测试成功",email.getName());
flag = true;
} catch (IOException e) {
log.error("{}邮件服务连接测试失败,请检查邮件服务属性配置是否正确或邮件服务未开启,原因: ", email.getName(), e);
} finally {
log.error("{}邮件服务连接测试失败,请检查邮件服务属性配置是否正确或邮件服务未开启,原因{}",email.getName(),e.getMessage());
}finally {
try {
if (null != socket) {
if(null != socket){
socket.close();
}
} catch (IOException e) {
@ -145,14 +124,14 @@ public class EmailServiceManager {
/**
* 接收邮件
*/
public Message[] receiveMail1() throws Exception {
public Message[] receiveMail() throws Exception {
String status = EmailLogManager.STATUS_SUCCESS;
try {
try{
//配置邮件服务属性
Properties properties = new Properties();
properties.put("mail.store.protocol", "imap");
properties.put("mail.imap.host", email.getEmailServerAddress());
properties.put("mail.imap.port", email.getPort());
properties.put("mail.imap.port",email.getPort());
properties.put("mail.imap.connectiontimeout", "3000"); // 设置连接超时时间为3秒
properties.put("mail.imap.timeout", "3000"); // 设置读取超时时间为3秒
if (email.getIsQiye() == 1) {
@ -163,10 +142,10 @@ public class EmailServiceManager {
HashMap IAM = new HashMap();
//带上IMAP ID信息由key和value组成例如nameversionvendorsupport-email等
IAM.put("name", "myname");
IAM.put("version", "1.0.0");
IAM.put("vendor", "myclient");
IAM.put("support-email", "testmail@test.com");
IAM.put("name","myname");
IAM.put("version","1.0.0");
IAM.put("vendor","myclient");
IAM.put("support-email","testmail@test.com");
//获取邮件回话
final Session session = Session.getDefaultInstance(properties);
@ -175,26 +154,22 @@ public class EmailServiceManager {
//获取smtp协议的存储对象
store = (IMAPStore) session.getStore();
//连接
store.connect(email.getUsername(), email.getPassword());
if (email.getEmailServerType() == 1) {
// 解决163普通邮箱无法建立连接问题
((IMAPStore) store).id(IAM);
}
store.connect(email.getUsername(),email.getPassword());
// 解决163普通邮箱无法建立连接问题
store.id(IAM);
//获取收件箱
folder = store.getFolder("INBOX");//INBOX
folder.open(Folder.READ_WRITE);
//如果邮箱邮件数量 > 0
final int messageCount = folder.getMessageCount();
if (messageCount > 0) {
if(messageCount > 0){
Message[] messages = null;
if (Objects.isNull(this.systemStartupTime)) {
int finalNum = messageCount > this.receiveNum ? this.receiveNum : messageCount;
if(Objects.isNull(this.systemStartupTime)){
int finalNum = messageCount > this.receiveNum?this.receiveNum:messageCount;
//邮箱邮件下标是从1开始的
return folder.getMessages(1, finalNum);
return folder.getMessages(1,finalNum);
}
SearchTerm searchTerm = new ReceivedDateTerm(ComparisonTerm.GE, this.systemStartupTime);
SearchTerm searchTerm = new ReceivedDateTerm(ComparisonTerm.GE,this.systemStartupTime);
messages = folder.search(searchTerm);
Arrays.sort(messages, (o1, o2) -> {
try {
@ -205,164 +180,39 @@ public class EmailServiceManager {
}
return 0;
});
if (this.receiveNum >= messages.length) {
if(this.receiveNum >= messages.length){
return messages;
} else {
return Arrays.copyOfRange(messages, 0, this.receiveNum - 1);
}else{
return Arrays.copyOfRange(messages,0,this.receiveNum-1);
}
}
} catch (Exception e) {
} catch (Exception e){
status = EmailLogManager.STATUS_ERROR;
log.error("Email connection is abnormal, account is {}, service is {},the reason is {}.", email.getName(), email.getEmailServerAddress(), e.getMessage());
log.error("Email connection is abnormal, account is {}, service is {},the reason is {}.",email.getName(),email.getEmailServerAddress(),e.getMessage());
throw e;
} finally {
EmailLogEvent connectEvent = new EmailLogEvent(EmailLogManager.GS_TYPE_GET, email, status, EmailLogManager.CONNECT);
EmailLogEvent connectEvent = new EmailLogEvent(EmailLogManager.GS_TYPE_GET,email,status,EmailLogManager.CONNECT);
EmailLogManager.getInstance().setConnectLogEvent(connectEvent);
//GetAllId C++原业务是把远程邮箱邮件同步到C++本次java编写没有这一步所以和Connect绑定若Connect成功则GetAllId成功
EmailLogEvent getAllEvent = new EmailLogEvent(EmailLogManager.GS_TYPE_GET, status, EmailLogManager.GETALLID);
EmailLogEvent getAllEvent = new EmailLogEvent(EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETALLID);
EmailLogManager.getInstance().setGetAllIdLogEvent(getAllEvent);
}
return null;
}
public Message[] receiveMail() throws Exception {
String status = EmailLogManager.STATUS_SUCCESS;
try {
store = setStoreProperties();
//获取收件箱
folder = store.getFolder("INBOX");//INBOX
folder.open(Folder.READ_WRITE);
//如果邮箱邮件数量 > 0
final int messageCount = folder.getMessageCount();
if (messageCount > 0) {
Message[] messages = null;
if (Objects.isNull(this.systemStartupTime)) {
int finalNum = messageCount > this.receiveNum ? this.receiveNum : messageCount;
//邮箱邮件下标是从1开始的
return folder.getMessages(1, finalNum);
}
SearchTerm searchTerm = new ReceivedDateTerm(ComparisonTerm.GE, this.systemStartupTime);
messages = folder.search(searchTerm);
Arrays.sort(messages, (o1, o2) -> {
try {
if (o1.getReceivedDate() == null && o2.getReceivedDate() == null) {
return o1.getSentDate().compareTo(o2.getSentDate());
} else {
return o1.getReceivedDate().compareTo(o2.getReceivedDate());
}
} catch (MessagingException e) {
e.printStackTrace();
log.error(e.getMessage(), e);
}
return 0;
});
if (this.receiveNum >= messages.length) {
return messages;
} else {
return Arrays.copyOfRange(messages, 0, this.receiveNum - 1);
}
}
} catch (Exception e) {
status = EmailLogManager.STATUS_ERROR;
log.error("Email connection is abnormal, account is {}, service is {},the reason is {}.", email.getName(), email.getEmailServerAddress(), e.getMessage());
throw e;
} finally {
EmailLogEvent connectEvent = new EmailLogEvent(EmailLogManager.GS_TYPE_GET, email, status, EmailLogManager.CONNECT);
EmailLogManager.getInstance().setConnectLogEvent(connectEvent);
//GetAllId C++原业务是把远程邮箱邮件同步到C++本次java编写没有这一步所以和Connect绑定若Connect成功则GetAllId成功
EmailLogEvent getAllEvent = new EmailLogEvent(EmailLogManager.GS_TYPE_GET, status, EmailLogManager.GETALLID);
EmailLogManager.getInstance().setGetAllIdLogEvent(getAllEvent);
}
return null;
}
private Store setStoreProperties() throws MessagingException {
HashMap IAM = new HashMap();
//带上IMAP ID信息由key和value组成例如nameversionvendorsupport-email等
IAM.put("name", "myname");
IAM.put("version", "1.0.0");
IAM.put("vendor", "myclient");
IAM.put("support-email", "testmail@test.com");
Properties properties = getProperties();
//获取邮件回话
Session session = Session.getInstance(properties);
//获取smtp协议的存储对象
Store store = session.getStore();
log.info("连接 {}:{}:{}", email.getUsername(), email.getPassword(), email.getPort());
//连接
store.connect(email.getUsername(), email.getPassword());
if (email.getEmailServerType() == 1) {
// 解决163普通邮箱无法建立连接问题
((IMAPStore) store).id(IAM);
}
protocol = store.getURLName().getProtocol();
return store;
}
@NotNull
private Properties getProperties() {
Properties properties = new Properties();
switch (email.getPort()) {
case 110:
properties.put("mail.store.protocol", "pop3");
properties.put("mail.pop3.host", email.getEmailServerAddress());
properties.put("mail.pop3.port", email.getPort());
properties.put("mail.pop3.starttls.enable", "true");
// 超时设置(毫秒)
properties.put("mail.pop3.connectiontimeout", "10000");
properties.put("mail.pop3.timeout", "15000");
break;
case 995:
properties.put("mail.store.protocol", "pop3");
properties.put("mail.pop3.host", email.getEmailServerAddress());
properties.put("mail.pop3.port", email.getPort());
properties.put("mail.pop3.starttls.enable", "true");
properties.put("mail.pop3.connectiontimeout", "10000");
properties.put("mail.pop3.timeout", "15000");
properties.put("mail.pop3.auth", "true");
break;
case 143:
properties.put("mail.store.protocol", "imap");
properties.put("mail.imap.host", email.getEmailServerAddress());
properties.put("mail.imap.port", email.getPort());
properties.put("mail.imap.ssl.enable", "false");
properties.put("mail.imap.starttls.enable", "true");
properties.put("mail.imap.auth", "true");
// 超时设置(毫秒)
properties.put("mail.imap.connectiontimeout", "10000");
properties.put("mail.imap.timeout", "30000");
break;
case 993:
default:
properties.put("mail.store.protocol", "imap");
properties.put("mail.imap.host", email.getEmailServerAddress());
properties.put("mail.imap.port", email.getPort());
properties.put("mail.imap.connectiontimeout", "3000");
properties.put("mail.imap.timeout", "3000");
if (email.getIsQiye() == 1) {
properties.put("mail.imap.ssl.enable", "true");
} else {
properties.put("mail.imap.ssl.enable", "false");
}
break;
}
return properties;
}
/*
* 测试收件邮箱账号是否可以正常使用
* */
public boolean canReceive() {
public boolean canReceive(){
Integer port = email.getPort();
String username = email.getUsername();
String password = email.getPassword();
String host = email.getEmailServerAddress();
Properties props = getProperties();
Properties props = new Properties();
props.put("mail.store.protocol","imap");
props.put("mail.imap.host", host);
props.put("mail.imap.port", port);
Session session = Session.getInstance(props, new Authenticator() {
@Override
@ -371,26 +221,26 @@ public class EmailServiceManager {
}
});
try (Store store = session.getStore()) {
try(Store store = session.getStore()) {
store.connect(host, username, password);
return store.isConnected();
} catch (Exception e) {
log.error("收件邮箱服务[Host: {}, Port: {}, Username: {}]连接异常: {}", host, port, username, e.getMessage());
log.error("收件邮箱服务[Host: {}, Port: {}, Username: {}]连接异常: {}",host, port, username, e.getMessage());
return false;
}
}
/*
* 测试收件邮箱账号是否可以正常使用(开启了SSL安全验证的邮箱)
* */
public boolean canReceiveSSL() {
* 测试收件邮箱账号是否可以正常使用(开启了SSL安全验证的邮箱)
* */
public boolean canReceiveSSL(){
Integer port = email.getPort();
String username = email.getUsername();
String password = email.getPassword();
String host = email.getEmailServerAddress();
Properties props = new Properties();
props.put("mail.store.protocol", "imap");
props.put("mail.store.protocol","imap");
props.put("mail.imap.host", host);
props.put("mail.imap.port", port);
props.put("mail.imap.auth", "true");
@ -404,19 +254,19 @@ public class EmailServiceManager {
}
});
try (Store store = session.getStore()) {
try(Store store = session.getStore()) {
store.connect(host, username, password);
return store.isConnected();
} catch (Exception e) {
log.error("收件邮箱服务SSL[Host: {}, Port: {}, Username: {}]连接异常: {}", host, port, username, e.getMessage());
log.error("收件邮箱服务SSL[Host: {}, Port: {}, Username: {}]连接异常: {}",host, port, username, e.getMessage());
return false;
}
}
/*
* 测试发件邮箱账号是否可以正常使用
* */
public boolean canSend() {
* 测试发件邮箱账号是否可以正常使用
* */
public boolean canSend(){
Integer port = email.getPort();
String username = email.getUsername();
String password = email.getPassword();
@ -435,19 +285,19 @@ public class EmailServiceManager {
}
});
try (Transport transport = session.getTransport()) {
try (Transport transport = session.getTransport()){
transport.connect(host, username, password);
return true;
} catch (Exception e) {
log.error("发件邮箱服务[Host: {}, Port: {}, Username: {}]连接异常: {}", host, port, username, e.getMessage());
log.error("发件邮箱服务[Host: {}, Port: {}, Username: {}]连接异常: {}",host, port, username, e.getMessage());
return false;
}
}
/*
* 测试发件邮箱账号是否可以正常使用(开启了SSL安全验证的邮箱)
* */
public boolean canSendSSL() {
* 测试发件邮箱账号是否可以正常使用(开启了SSL安全验证的邮箱)
* */
public boolean canSendSSL(){
Integer port = email.getPort();
String username = email.getUsername();
String password = email.getPassword();
@ -468,11 +318,11 @@ public class EmailServiceManager {
}
});
try (Transport transport = session.getTransport()) {
try (Transport transport = session.getTransport()){
transport.connect(host, username, password);
return true;
} catch (Exception e) {
log.error("发件邮箱服务SSL[Host: {}, Port: {}, Username: {}]连接异常: {}", host, port, username, e.getMessage());
log.error("发件邮箱服务SSL[Host: {}, Port: {}, Username: {}]连接异常: {}",host, port, username, e.getMessage());
return false;
}
}
@ -508,7 +358,7 @@ public class EmailServiceManager {
// 发送邮件
Transport transport = session.getTransport();
transport.connect(email.getUsername(), email.getPassword());
transport.connect(email.getUsername(),email.getPassword());
transport.sendMessage(message, message.getAllRecipients());
// 关闭资源
@ -518,7 +368,7 @@ public class EmailServiceManager {
/**
* 发送邮件 群发
*/
public void sendMail(MessageDTO messageDTO) {
public void sendMail(MessageDTO messageDTO){
// 邮箱连接属性
Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
@ -543,24 +393,24 @@ public class EmailServiceManager {
InternetAddress.parse(messageDTO.getToUser()));
// 发送邮件
transport = session.getTransport();
transport.connect(email.getUsername(), email.getPassword());
transport.sendMessage(message, message.getAllRecipients());
transport.connect(email.getUsername(),email.getPassword());
transport.sendMessage(message,message.getAllRecipients());
} catch (MessagingException e) {
// 无效的电子邮箱导致群发失败,剔除无效邮箱然后重新发送
Address[] invalid;
if (e instanceof SMTPAddressFailedException) {
invalid = ((SMTPAddressFailedException) e).getInvalidAddresses();
reSendMail(invalid, messageDTO);
reSendMail(invalid,messageDTO);
} else if (e instanceof SendFailedException) {
invalid = ((SendFailedException) e).getInvalidAddresses();
reSendMail(invalid, messageDTO);
reSendMail(invalid,messageDTO);
}
} finally {
if (transport != null) {
}finally {
if (transport != null){
try {
transport.close();
} catch (MessagingException e) {
log.error("Transport关闭失败,{}", e);
log.error("Transport关闭失败,{}",e);
}
}
}
@ -572,20 +422,20 @@ public class EmailServiceManager {
* @param invalid 无效电子邮箱列表
* @param messageDTO 消息dto
*/
private void reSendMail(Address[] invalid, MessageDTO messageDTO) {
private void reSendMail(Address[] invalid,MessageDTO messageDTO){
List<String> invalidEmails = Arrays.stream(invalid)
.map(address -> address.toString())
.collect(Collectors.toList());
log.warn("部分或者全部邮件发送失败,无效的电子邮箱:{}", invalidEmails);
log.warn("部分或者全部邮件发送失败,无效的电子邮箱:{}",invalidEmails);
String[] allEmails = messageDTO.getToUser().split(SymbolConstant.COMMA);
String[] emails = new String[]{};
for (String address : invalidEmails) {
emails = ArrayUtil.removeEle(allEmails, address);
emails = ArrayUtil.removeEle(allEmails,address);
}
// 如果移除无效电子邮箱后,待发送邮箱不为空
String toUser = Arrays.stream(emails)
.collect(Collectors.joining(SymbolConstant.COMMA));
if (StrUtil.isNotBlank(toUser)) {
if (StrUtil.isNotBlank(toUser)){
messageDTO.setToUser(toUser);
sendMail(messageDTO);
}
@ -593,11 +443,10 @@ public class EmailServiceManager {
/**
* 获取邮件主题
*
* @param message
* @return
*/
public String getMailSubject(@NotNull Message message, Integer batchesCounter) throws MessagingException {
public String getMailSubject(@NotNull Message message,Integer batchesCounter) throws MessagingException {
String subject = "";
String status = EmailLogManager.STATUS_SUCCESS;
try {
@ -607,61 +456,34 @@ public class EmailServiceManager {
} catch (MessagingException e) {
status = EmailLogManager.STATUS_ERROR;
throw e;
} finally {
EmailLogEvent event = new EmailLogEvent(batchesCounter, Thread.currentThread().getId(), EmailLogManager.GS_TYPE_GET, status, EmailLogManager.GETIDHEADER);
EmailLogManager.getInstance().offer(Thread.currentThread().getId(), event);
}finally {
EmailLogEvent event = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETIDHEADER);
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),event);
}
return subject;
}
public String getMessagesID(Message message, Integer batchesCounter) throws MessagingException {
String messageId = null;
String status = EmailLogManager.STATUS_SUCCESS;
try {
if (null == message.getHeader("Message-ID")) {
String subject = message.getSubject().replace(" ", StringConstant.UNDER_LINE);
Date date = message.getReceivedDate() == null ? message.getSentDate() : message.getReceivedDate();
String receivedStr = DateUtil.format(date, DatePattern.NORM_DATETIME_MINUTE_PATTERN);
messageId = subject + StringConstant.UNDER_LINE + receivedStr;
} else {
messageId = ((MimeMessage) message).getMessageID();
}
} catch (MessagingException e) {
status = EmailLogManager.STATUS_ERROR;
log.error(e.getMessage());
throw e;
}finally {
EmailLogEvent event = new EmailLogEvent(batchesCounter, Thread.currentThread().getId(), EmailLogManager.GS_TYPE_GET, status, EmailLogManager.GETIDHEADER);
EmailLogManager.getInstance().offer(Thread.currentThread().getId(), event);
}
return messageId;
}
/**
* 获取邮件内容
*
* @param part
* @return
* @throws MessagingException
* @throws IOException
*/
public void getMailContent(@NotNull Part part, StringBuilder content) throws MessagingException, IOException {
if (part.isMimeType(MailContentType.PLAIN.getContentType())) {
if(part.isMimeType(MailContentType.PLAIN.getContentType())){
content.append(part.getContent());
} else if (part.isMimeType("multipart/*")) {
}else if(part.isMimeType("multipart/*")){
Multipart multipart = (Multipart) part.getContent();
for (int i = 0; i < multipart.getCount(); i++) {
for(int i=0;i<multipart.getCount();i++) {
final Part bodyPart = multipart.getBodyPart(i);
getMailContent(bodyPart, content);
getMailContent(bodyPart,content);
}
}
}
/**
* 保存邮件附件
*
* @param part
* @throws MessagingException
* @throws IOException
@ -669,27 +491,27 @@ public class EmailServiceManager {
public List<String> saveAttachment(@NotNull Part part) throws MessagingException, IOException {
List<String> filePathList = Lists.newArrayList();
Multipart multipart = (Multipart) part.getContent();
for (int i = 0; i < multipart.getCount(); i++) {
for(int i=0;i<multipart.getCount();i++){
final BodyPart bodyPart = multipart.getBodyPart(i);
if (Part.ATTACHMENT.equalsIgnoreCase(bodyPart.getDisposition())) {
if(Part.ATTACHMENT.equalsIgnoreCase(bodyPart.getDisposition())){
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
try{
final String fileName = MimeUtility.decodeText(bodyPart.getFileName());
bis = new BufferedInputStream(bodyPart.getInputStream());
File file = new File(this.temporaryStoragePath + File.separator + fileName);
File file = new File(this.temporaryStoragePath+File.separator+fileName);
bos = new BufferedOutputStream(new FileOutputStream(file));
byte[] buf = new byte[4096];
int len;
while (-1 != (len = bis.read(buf, 0, buf.length))) {
bos.write(buf, 0, buf.length);
while(-1 != (len = bis.read(buf,0,buf.length))){
bos.write(buf,0,buf.length);
}
filePathList.add(file.getAbsolutePath());
} finally {
if (null != bis) {
}finally {
if(null != bis){
bis.close();
}
if (null != bos) {
if(null != bos){
bos.flush();
bos.close();
}
@ -706,75 +528,83 @@ public class EmailServiceManager {
* 新格式为发件人_主题_年月日_时分秒毫秒_receive_年月日_时分秒毫秒_计数0-10000
* 当计数大于10000后从0开始服务重启后也从0开始
*/
public File downloadEmailToEmlDir(@NotNull Message message, Integer emailCounter, Integer batchesCounter) throws MessagingException {
public File downloadEmailToEmlDir(@NotNull Message message,Integer emailCounter,Integer batchesCounter) throws MessagingException {
synchronized (downloadEmlLocal) {
String subject = "";
File emlFile = null;
String status = EmailLogManager.STATUS_SUCCESS;
Date receivedDate = null;
//InputStream inputStream = null;
//BufferedOutputStream outputStream = null;
InputStream inputStream = null;
BufferedOutputStream outputStream = null;
try {
//获取发件人
final String address = ((InternetAddress) message.getFrom()[0]).getAddress();
final String from = address.substring(0, address.indexOf(StringConstant.AT));
final String from = address.substring(0,address.indexOf(StringConstant.AT));
//获取主题
subject = MimeUtility.decodeText(message.getSubject());
if (subject.indexOf(StringConstant.SLASH) != -1) {
subject = StringUtils.replace(subject, StringConstant.SLASH, "");
if(subject.indexOf(StringConstant.SLASH) != -1){
subject = StringUtils.replace(subject,StringConstant.SLASH,"");
}
if (subject.indexOf(StringConstant.COLON) != -1) {
subject = StringUtils.replace(subject, StringConstant.COLON, "");
if(subject.indexOf(StringConstant.COLON) != -1){
subject = StringUtils.replace(subject,StringConstant.COLON,"");
}
receivedDate = message.getReceivedDate() == null ? message.getSentDate() : message.getReceivedDate();
receivedDate = message.getReceivedDate();
StringBuilder fileName = new StringBuilder();
fileName.append(from);
fileName.append(StringConstant.UNDER_LINE);
fileName.append(subject);
fileName.append(StringConstant.UNDER_LINE);
fileName.append(DateUtils.formatDate(new Date(), "YYMMdd"));
fileName.append(DateUtils.formatDate(new Date(),"YYMMdd"));
fileName.append(StringConstant.UNDER_LINE);
fileName.append(DateUtils.formatDate(new Date(), "HHmmssSSS"));
fileName.append(DateUtils.formatDate(new Date(),"HHmmssSSS"));
fileName.append(StringConstant.UNDER_LINE);
fileName.append("receive");
fileName.append(StringConstant.UNDER_LINE);
fileName.append(DateUtils.formatDate(receivedDate, "YYMMdd"));
fileName.append(DateUtils.formatDate(receivedDate,"YYMMdd"));
fileName.append(StringConstant.UNDER_LINE);
fileName.append(DateUtils.formatDate(receivedDate, "HHmmssSSS"));
fileName.append(DateUtils.formatDate(receivedDate,"HHmmssSSS"));
fileName.append(StringConstant.UNDER_LINE);
fileName.append(emailCounter);
fileName.append(SAVE_EML_SUFFIX);
final String rootPath = spectrumPathProperties.getRootPath();
final String emlPath = spectrumPathProperties.getEmlPath();
emlFile = new File(rootPath + emlPath + File.separator + fileName);
emlFile = new File(rootPath+emlPath+File.separator+fileName);
// outputStream = new FileOutputStream(emlFile);
// message.writeTo(outputStream);
int bufferSize = 1024 * 1024; // 1M
try (InputStream inputStream = message.getInputStream();
BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(emlFile),bufferSize)) {
byte[] buffer = new byte[1024*1024];
int bytesRead;
while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
outputStream.flush(); // 显式刷新
} catch (IOException e) {
FileUtils.copyInputStreamToFile(message.getInputStream(), emlFile);
}
if (emlFile.length() <= 0) {
FileUtils.copyInputStreamToFile(message.getInputStream(), emlFile);
inputStream = message.getInputStream();
outputStream = new BufferedOutputStream(new FileOutputStream(emlFile), bufferSize);
// 从邮件的输入流读取内容并写入到本地文件
byte[] buffer = new byte[bufferSize];
int bytesRead;
while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
} catch (MessagingException | IOException e) {
// 下载邮件失败 抛出自定义邮件下载异常
status = EmailLogManager.STATUS_ERROR;
String errorMsg = StrUtil.format("The email download failed, the subject of the email is {}, the reason is {}.", subject, e.getMessage());
log.error(errorMsg);
throw new DownloadEmailException(errorMsg);
} catch (Exception e) {
log.error("", e);
throw new RuntimeException(e);
} finally {
EmailLogEvent event = new EmailLogEvent(batchesCounter, Thread.currentThread().getId(), EmailLogManager.GS_TYPE_GET, status, EmailLogManager.GETIDEML, subject, DateUtils.formatDate(receivedDate, "yyyy-MM-dd HH:mm:ss:SSS"),
(Objects.isNull(emlFile) ? " " : emlFile.getAbsolutePath()));
EmailLogManager.getInstance().offer(Thread.currentThread().getId(), event);
}catch (Exception e) {
log.error("",e);
}finally {
EmailLogEvent event = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETIDEML,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"),
(Objects.isNull(emlFile)?" ":emlFile.getAbsolutePath()));
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),event);
try {
if (Objects.nonNull(inputStream)) {
inputStream.close();
}
if (Objects.nonNull(outputStream)) {
outputStream.flush();
outputStream.close();
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return emlFile;
}
@ -814,7 +644,7 @@ public class EmailServiceManager {
throw new RuntimeException("下载 eml 执行超时");
}
}*/
public File executeWithLock(Message message, Integer emailCounter, Integer batchesCounter) throws MessagingException {
public File executeWithLock(Message message,Integer emailCounter,Integer batchesCounter) throws MessagingException {
String subject = "";
File emlFile = null;
@ -824,36 +654,36 @@ public class EmailServiceManager {
// 获取锁 设置超时
//获取发件人
final String address = ((InternetAddress) message.getFrom()[0]).getAddress();
final String from = address.substring(0, address.indexOf(StringConstant.AT));
final String from = address.substring(0,address.indexOf(StringConstant.AT));
//获取主题
subject = MimeUtility.decodeText(message.getSubject());
if (subject.contains(StringConstant.SLASH)) {
subject = StringUtils.replace(subject, StringConstant.SLASH, "");
if(subject.contains(StringConstant.SLASH)){
subject = StringUtils.replace(subject,StringConstant.SLASH,"");
}
if (subject.contains(StringConstant.COLON)) {
subject = StringUtils.replace(subject, StringConstant.COLON, "");
if(subject.contains(StringConstant.COLON)){
subject = StringUtils.replace(subject,StringConstant.COLON,"");
}
receivedDate = message.getReceivedDate() == null ? message.getSentDate() : message.getReceivedDate();
receivedDate = message.getReceivedDate();
StringBuilder fileName = new StringBuilder();
fileName.append(from);
fileName.append(StringConstant.UNDER_LINE);
fileName.append(subject);
fileName.append(StringConstant.UNDER_LINE);
fileName.append(DateUtils.formatDate(new Date(), "YYMMdd"));
fileName.append(DateUtils.formatDate(new Date(),"YYMMdd"));
fileName.append(StringConstant.UNDER_LINE);
fileName.append(DateUtils.formatDate(new Date(), "HHmmssSSS"));
fileName.append(DateUtils.formatDate(new Date(),"HHmmssSSS"));
fileName.append(StringConstant.UNDER_LINE);
fileName.append("receive");
fileName.append(StringConstant.UNDER_LINE);
fileName.append(DateUtils.formatDate(receivedDate, "YYMMdd"));
fileName.append(DateUtils.formatDate(receivedDate,"YYMMdd"));
fileName.append(StringConstant.UNDER_LINE);
fileName.append(DateUtils.formatDate(receivedDate, "HHmmssSSS"));
fileName.append(DateUtils.formatDate(receivedDate,"HHmmssSSS"));
fileName.append(StringConstant.UNDER_LINE);
fileName.append(emailCounter);
fileName.append(SAVE_EML_SUFFIX);
final String rootPath = spectrumPathProperties.getRootPath();
final String emlPath = spectrumPathProperties.getEmlPath();
emlFile = new File(rootPath + emlPath + File.separator + fileName);
emlFile = new File(rootPath+emlPath+File.separator+fileName);
// Thread.sleep(6000l);
// try(FileOutputStream outputStream = new FileOutputStream(emlFile)) {
// message.writeTo(outputStream);
@ -866,12 +696,12 @@ public class EmailServiceManager {
String errorMsg = StrUtil.format("The email download failed, the subject of the email is {}, the reason is {}.", subject, e.getMessage());
log.error(errorMsg);
throw new DownloadEmailException(errorMsg);
} catch (Exception e) {
log.error("", e);
} catch (Exception e) {
log.error("",e);
} finally {
EmailLogEvent event = new EmailLogEvent(batchesCounter, Thread.currentThread().getId(), EmailLogManager.GS_TYPE_GET, status, EmailLogManager.GETIDEML, subject, DateUtils.formatDate(receivedDate, "yyyy-MM-dd HH:mm:ss:SSS"),
(Objects.isNull(emlFile) ? " " : emlFile.getAbsolutePath()));
EmailLogManager.getInstance().offer(Thread.currentThread().getId(), event);
EmailLogEvent event = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETIDEML,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"),
(Objects.isNull(emlFile)?" ":emlFile.getAbsolutePath()));
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),event);
}
return emlFile;
}
@ -879,79 +709,73 @@ public class EmailServiceManager {
public void a(AtomicReference<FileOutputStream> outputStream, Message message) throws MessagingException, IOException {
message.writeTo(outputStream.get());
}
/**
* 删除邮件
*
* @param message
* @throws MessagingException
*/
public void removeMail(@NotNull Message message, Integer batchesCounter) {
public void removeMail(@NotNull Message message,Integer batchesCounter){
String status = EmailLogManager.STATUS_SUCCESS;
String subject = "";
Date receivedDate = null;
try {
subject = MimeUtility.decodeText(message.getSubject());
receivedDate = message.getReceivedDate() == null ? message.getSentDate() : message.getReceivedDate();
message.setFlag(Flags.Flag.DELETED, true);
receivedDate = message.getReceivedDate();
message.setFlag(Flags.Flag.DELETED,true);
// log.info("EmailServiceManager: Remove Email:{},receiveTime:{}",message.getSubject(), DateUtils.formatDate(message.getReceivedDate(),"yyyy-MM-dd HH:mm:ss"));
} catch (MessagingException | UnsupportedEncodingException e) {
status = EmailLogManager.STATUS_ERROR;
log.error("Email deletion failed, the subject of the email is :{}, the reason is :", subject, e);
log.error("Email deletion failed, the subject of the email is :{}, the reason is :{}.",subject,e.getMessage());
e.printStackTrace();
} catch (Exception e) {
log.error(e.getMessage(), e);
} finally {
EmailLogEvent removeEvent = new EmailLogEvent(batchesCounter, Thread.currentThread().getId(), EmailLogManager.GS_TYPE_GET, status, EmailLogManager.DELETEID, subject, DateUtils.formatDate(receivedDate, "yyyy-MM-dd HH:mm:ss:SSS"));
EmailLogManager.getInstance().offer(Thread.currentThread().getId(), removeEvent);
}finally {
EmailLogEvent removeEvent = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.DELETEID,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"));
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),removeEvent);
//这里删除和彻底删除一起写入日志java和C++处理有差异java是在连接关闭时彻底删除的
EmailLogEvent expungeEvent = new EmailLogEvent(batchesCounter, Thread.currentThread().getId(), EmailLogManager.GS_TYPE_GET, status, EmailLogManager.EXPUNGE, subject, DateUtils.formatDate(receivedDate, "yyyy-MM-dd HH:mm:ss:SSS"));
EmailLogManager.getInstance().offer(Thread.currentThread().getId(), expungeEvent);
EmailLogEvent expungeEvent = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.EXPUNGE,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"));
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),expungeEvent);
}
}
/**
* 关闭邮件服务连接资源
*/
public void close(List<String> messageIds) {
public void close(List<String> messageIds){
try {
if (null != folder) {
if ("imap".equalsIgnoreCase(protocol)) {
folder.expunge();
}
if(null != folder){
folder.expunge();
folder.close();
}
if (null != store) {
if(null != store){
store.close();
}
log.info("{}: EmailServiceManage资源关闭完成.", Thread.currentThread().getName());
for (String messageId : messageIds) {
String key = RedisConstant.EMAIL_MSG_ID + StringConstant.COLON + messageId;
redisUtil.del(key);
}
log.info(Thread.currentThread().getName() + ",EmailServiceManage资源关闭完成.");
// for(String messageId : messageIds){
// String key = RedisConstant.EMAIL_MSG_ID+StringConstant.COLON+messageId;
// redisUtil.del(key);
// }
} catch (MessagingException e) {
log.error("Email closure failed, email address is: {}, reason is: {}", email.getUsername(), e);
log.error("Email closure failed, email address is: {}, reason is: {}",email.getUsername(),e.getMessage());
e.printStackTrace();
log.error(e.getMessage(), e);
}
}
/**
* 校验邮件
* 若此次获取的邮件是上次删除失败的邮件直接删除
*
* @param message
*/
public boolean check(Message message, String messageId) {
public boolean check(Message message,String messageId){
boolean exist = false;
try {
String key = RedisConstant.EMAIL_MSG_ID + StringConstant.COLON + messageId;
int numberKey = redisUtil.get(key) != null ? (int) redisUtil.get(key) : 0;
String key = RedisConstant.EMAIL_MSG_ID+StringConstant.COLON+messageId;
int numberKey = redisUtil.get(key) != null? (int) redisUtil.get(key):0;
// exist = redisUtil.hasKey(key);
if (numberKey >= taskProperties.getForceDeletedNumber()) {
if(numberKey >= taskProperties.getForceDeletedNumber()){
exist = true;
Date dateUtils = message.getReceivedDate() == null ? message.getSentDate() : message.getReceivedDate();
log.info("Check: Remove Email:{},receiveTime:{}", message.getSubject(), DateUtils.formatDate(dateUtils, "yyyy-MM-dd HH:mm:ss"));
message.setFlag(Flags.Flag.DELETED, true);
log.info("Check: Remove Email:{},receiveTime:{}",message.getSubject(), DateUtils.formatDate(message.getReceivedDate(),"yyyy-MM-dd HH:mm:ss"));
message.setFlag(Flags.Flag.DELETED,true);
redisUtil.del(key);
}
return exist;

View File

@ -1,48 +0,0 @@
package org.jeecg.common.handler;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class MybatisTypeHandler extends BaseTypeHandler<Boolean> {
/**
* 功能描述: <br>
* <>
* @param: [ps, i, parameter, jdbcType]
* i:Jdbc预编译时设置参数的索引值
* parameter:要插入的参数值 true 或者false
* jdbcType:要插入JDBC的类型
* 里面的业务逻辑要根据实际开发场景来写 我这里就写的简单一点比较好理解一下
* @return:
* @author: wlt
* @date: 2022/3/22 21:25
**/
@Override
public void setNonNullParameter(PreparedStatement ps, int i, Boolean parameter, JdbcType jdbcType) throws SQLException {
if (parameter){
ps.setInt(i,1);
}else ps.setInt(i,0);
}
@Override
public Boolean getNullableResult(ResultSet rs, String columnName) throws SQLException {
int man = rs.getInt(columnName);
return man == 1 ? true : false;
}
@Override
public Boolean getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
int man = rs.getInt(columnIndex);
return man == 1 ? true : false;
}
@Override
public Boolean getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
int man = cs.getInt(columnIndex);
return man == 1 ? true : false;
}
}

View File

@ -0,0 +1,99 @@
package org.jeecg.common.parameter;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import org.jeecg.common.constant.RedisConstant;
import org.jeecg.common.properties.ParameterProperties;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.entity.vo.NuclideLine;
import org.jeecg.modules.entity.vo.SelfParameter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.IOException;
import java.util.Objects;
@Configuration
public class SelfParameterInit {
@Autowired
private ParameterProperties parameterProperties;
@Autowired
private RedisUtil redisUtil;
@Bean
public void readSelfMDCParameter() {
//配置文件路径
String filePath = parameterProperties.getFilePath()+ File.separator + parameterProperties.getSelfParameterFile();
SelfParameter selfParameter = new SelfParameter();
try {
//创建一个文档解析器工厂
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
//创建文档解析器
DocumentBuilder documentBuilder = factory.newDocumentBuilder();
//读取xml文件生成一个文档
Document document = documentBuilder.parse(filePath);
if (Objects.nonNull(document)){
//获取文档的根元素
Element element = document.getDocumentElement();
//获取根元素的子节点
NodeList docChildNodes = element.getChildNodes();
//判断文件内的节点是否大于0
if (Objects.nonNull(docChildNodes) && docChildNodes.getLength() > 0) {
//遍历文件节点读取内容
for (int i=0; i<docChildNodes.getLength(); i++) {
//获取节点信息
Node node = docChildNodes.item(i);
//判断节点名称是否是 P
if (node.getNodeName().equalsIgnoreCase("nuclide")) {
//获取节点下的子节点信息
NodeList childNodes = node.getChildNodes();
//如果子节点不为空
if (Objects.nonNull(childNodes) && childNodes.getLength() > 0) {
//遍历子节点信息 将核素信息封存到缓存中
for (int j=0; j<childNodes.getLength(); j++) {
Node childNode = childNodes.item(j);
//获取节点属性信息
NamedNodeMap attributes = childNode.getAttributes();
//判断节点属性信息是否为空
if (Objects.nonNull(attributes)) {
NuclideLine nuclide = new NuclideLine();
//遍历属性信息
for (int k=0; k<attributes.getLength(); k++) {
//根据顺序读取属性
Node attribute = attributes.item(k);
if (attribute.getNodeName().equalsIgnoreCase("nuclide_name")) {
nuclide.setName(attribute.getNodeValue());
} else if (attribute.getNodeName().equalsIgnoreCase("yield")) {
nuclide.setYield(Double.valueOf(attribute.getNodeValue()));
} else if (attribute.getNodeName().equalsIgnoreCase("energy")) {
nuclide.setEnergy(Double.valueOf(attribute.getNodeValue()));
}
}
if (StrUtil.isNotBlank(nuclide.getName()) && Objects.nonNull(nuclide.getEnergy())) {
selfParameter.getNuclideMap().put(nuclide.getName(), nuclide);
}
}
}
}
}
}
}
}
redisUtil.set(RedisConstant.SELF_PARAMETER, selfParameter);
} catch (ParserConfigurationException e) {
throw new RuntimeException(e);
} catch (SAXException e) {
throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}

View File

@ -74,11 +74,6 @@ public class SpectrumPathProperties implements Serializable {
*/
private String errorFilePath;
/**
* dos谱外放目录西安那边从外放目录拿取dos谱
*/
private String dosExternalDirectory;
/**
* 能谱文件存储路径以能谱系统类型/能谱类型为key以存储路径为value
*/

View File

@ -1,14 +1,13 @@
package org.jeecg.common.util;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
public class DataTool {
private int counter = 1;
private final Map<String, Object> data = new LinkedHashMap<>();
private final Map<String, Object> data = new HashMap<>();
public DataTool put(Object value) {
data.put(String.format("p%d", counter), value);

View File

@ -206,29 +206,6 @@ public class DateUtils extends PropertyEditorSupport {
return sformat.format(nowDate);
}
/**
* 时间字符串格式转换
* @param date 时间字符串
* @param sourceFormat 字符串原有格式
* @param targetFormat 需要转换成的格式
* @return 字符串
*/
public static String dateformat(String date,String sourceFormat,String targetFormat)
{
SimpleDateFormat sformat = new SimpleDateFormat(sourceFormat);
Date nowDate = null;
try {
nowDate = sformat.parse(date);
sformat=new SimpleDateFormat(targetFormat);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return sformat.format(nowDate);
}
/**
* 日期转换为字符串
*

View File

@ -1,6 +1,8 @@
package org.jeecg.common.util;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@ -12,11 +14,18 @@ import org.jeecgframework.poi.excel.ExcelExportUtil;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.TemplateExportParams;
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;

View File

@ -74,6 +74,27 @@ public class FTPUtil {
return this.ftpRootPath;
}
public static void main(String[] args) {
try {
FTPClient ftp = new FTPClient();
//连接
ftp.connect("172.21.170.122", 21);
//登录
ftp.login("rmsops", "cnndc010");
// 切换为本地被动模式可以解决FTP上传后文件为空的问题但需要服务器将FTP服务添加至防火墙白名单
ftp.enterLocalPassiveMode();
//切换工作路径
ftp.changeWorkingDirectory("/SpectrumFile/admin");
//判断是否连接成功
int reply = ftp.getReplyCode();
if (!FTPReply.isPositiveCompletion(reply)) {
ftp.disconnect();
System.out.printf(reply+"");
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
/**
* 登录ftp
* @return
@ -89,7 +110,7 @@ public class FTPUtil {
// 切换为本地被动模式可以解决FTP上传后文件为空的问题但需要服务器将FTP服务添加至防火墙白名单
ftp.enterLocalPassiveMode();
//切换工作路径
ftp.changeWorkingDirectory(ftpRootPath);
ftp.changeWorkingDirectory("/");
//判断是否连接成功
int reply = ftp.getReplyCode();
if (!FTPReply.isPositiveCompletion(reply)) {

View File

@ -1,9 +1,12 @@
package org.jeecg.common.util;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import org.jeecg.common.properties.SpectrumPathProperties;
import org.jeecg.modules.base.enums.DataType;
import org.jeecg.modules.base.enums.SystemType;
import org.jeecg.modules.entity.vo.PHDFile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
@ -18,21 +21,24 @@ import java.util.Map;
@Component
public class NameStandUtil {
@Autowired
private SpectrumPathProperties pathProperties;
public String GetSysTemSubdir(String systemType) {
StringBuffer path = new StringBuffer();
String path = null;
Map<String, String> pathMap = pathProperties.getFilePathMap();
if(systemType.contains(SystemType.BETA.getType())) {
path.append("Spectrum");
path.append(StringPool.SLASH+"Xenon");
path.append(StringPool.SLASH+"Sauna");
path = pathMap.getOrDefault(SystemType.BETA.getType(), "Spectrum/Xenon/Sauna");
} else if(systemType.contains(SystemType.GAMMA.getType())) {
path.append("Spectrum");
path.append(StringPool.SLASH+"Xenon");
path.append(StringPool.SLASH+"Spalax");
path = pathMap.getOrDefault(SystemType.GAMMA.getType(), "Spectrum/Xenon/Spalax");
} else if(systemType.contains(SystemType.PARTICULATE.getType())) {
path.append("Spectrum");
path.append(StringPool.SLASH+"Particulates");
path = pathMap.getOrDefault(SystemType.PARTICULATE.getType(), "Spectrum/Particulates");
} else if(systemType.contains(SystemType.WATER.getType())) {
path = pathMap.getOrDefault(SystemType.WATER.getType(), "Spectrum/Water");
} else if (systemType.contains(SystemType.SELFSTATION.getType())) {
path = pathMap.getOrDefault(SystemType.SELFSTATION.getType(), "Spectrum/Xenon/Self");
}
return path.toString();
return path;
}
public String GetDateTypeSubdir(String dataType){
@ -81,14 +87,15 @@ public class NameStandUtil {
public Map<String, String> NameStandard(String dataType, String spectrumQuantity, Double acqusitionLiveTime, String sampleFileName, String measurementId) {
String suffix = GetSuffix(dataType, spectrumQuantity,String.valueOf(acqusitionLiveTime));
Map<String, String> fileNames = NameStandardByName(sampleFileName, measurementId,suffix);
return fileNames;
return NameStandardByName(sampleFileName, measurementId,suffix);
}
public Map<String, String> NameStandard(PHDFile fileAnlyse) {
String suffix = GetSuffix(fileAnlyse.getMsgInfo().getData_type(), fileAnlyse.getHeader().getSpectrum_quantity(),String.valueOf(fileAnlyse.getAcq().getAcquisition_live_time()));
Map<String, String> fileNames = NameStandardByName(fileAnlyse.getFilename(), fileAnlyse.getHeader().getMeasurement_id(),suffix);
return fileNames;
String suffix = GetSuffix(fileAnlyse.getMsgInfo().getData_type(),
fileAnlyse.getHeader().getSpectrum_quantity(),
String.valueOf(fileAnlyse.getAcq().getAcquisition_live_time()),
fileAnlyse.getRoiSuffix());
return NameStandardByName(fileAnlyse.getFilename(), fileAnlyse.getHeader().getMeasurement_id(),suffix);
}
public String GetSuffix(String dataType, String Fulltype, String LT) {
@ -114,6 +121,33 @@ public class NameStandUtil {
return rData;
}
public String GetSuffix(String dataType, String Fulltype, String LT, String roiSuffix) {
String rData = "";
DecimalFormat df = new DecimalFormat("#.##########");
//AUX09_003-20151226_1855 _S_FULL_40184.8.PHD
//将acquisition_live_time保留六位有效数字 如果保留一位小数后小数点后的值是0则四舍五入保留整数否则按正常条件四舍五入保留小数位
String numberCal = NumberFormatUtil.numberCal(LT);
numberCal = df.format(Double.valueOf(numberCal));
// 谱类型增加 SPHDF SPHDP
if(dataType.contains(DataType.SAMPLEPHD.getType()) ||
dataType.contains(DataType.SPHDF.getType()) ||
dataType.contains(DataType.SPHDP.getType())) {
rData = StrUtil.isBlank(roiSuffix) ? "_S_"+Fulltype+"_"+numberCal+".PHD"
: "_S_"+Fulltype+"_"+numberCal+roiSuffix+".PHD";
} else if(dataType.contains(DataType.GASBKPHD.getType())) {
rData = StrUtil.isBlank(roiSuffix) ? "_G_"+Fulltype+"_"+numberCal+".PHD"
: "_G_"+Fulltype+"_"+numberCal+roiSuffix+".PHD";
} else if(dataType.contains(DataType.DETBKPHD.getType())) {
rData = StrUtil.isBlank(roiSuffix) ? "_D_"+Fulltype+"_"+numberCal+".PHD"
: "_D_"+Fulltype+"_"+numberCal+roiSuffix+".PHD";
} else if(dataType.contains(DataType.QCPHD.getType())) {
rData = StrUtil.isBlank(roiSuffix) ? "_Q_"+Fulltype+"_"+numberCal+".PHD"
: "_Q_"+Fulltype+"_"+numberCal+roiSuffix+".PHD";
}
return rData;
}
public Map<String, String> NameStandardByName(String fileName, String dateTimeFormat, String suffix) {
Map<String, String> map = new HashMap<>();
String StandardFileName="";

View File

@ -55,15 +55,6 @@ public class NumUtil {
return result;
}
public static String keep6ScienceStr(Double value){
if (ObjectUtil.isNull(value))
return null;
String result = NumberUtil.decimalFormat("0.######E00", value);
if (!StrUtil.contains(result, "E-"))
return StrUtil.replace(result, "E", "E+");
return result;
}
public static Double keep(Double value, int scale){
if (ObjectUtil.isNull(value))
return null;

View File

@ -80,9 +80,6 @@ public class NumberFormatUtil {
//总数字个数是6位的数
public static String numberSixLen(String number) {
if (StringUtils.isBlank(number)) {
return number;
}
String value = "";
if (number.equalsIgnoreCase("nan")) {
value = number;

View File

@ -1,264 +0,0 @@
package org.jeecg.common.util;
import lombok.extern.slf4j.Slf4j;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
@Slf4j
public class RadionuclideUtil {
// 存储所有分类的核素数据分类名称核素列表
private static final Map<String, List<String>> radionuclideData = new HashMap<>();
// 反向映射核素到分类的映射用于快速查询
private static final Map<String, String> nuclideToSection = new HashMap<>();
// 初始化标志
private static boolean initialized = false;
private static Integer dayValue;
/**
* 初始化方法从XML文件加载数据
*
* @param xmlFilePath XML文件路径
* @throws Exception 加载过程中发生的异常
*/
public static synchronized void initialize(String xmlFilePath)
throws ParserConfigurationException, SAXException, IOException {
File xmlFile = new File(xmlFilePath);
if (!xmlFile.exists()) {
throw new FileNotFoundException("XML file not found: " + xmlFilePath);
}
if (!xmlFile.isFile()) {
throw new IOException("Path is not a file: " + xmlFilePath);
}
initializeInternal(xmlFile);
}
/**
* 重载初始化方法支持从输入流加载数据
*
* @param xmlInputStream XML输入流
* @throws Exception 加载过程中发生的异常
*/
public static synchronized void initialize(InputStream xmlInputStream)
throws ParserConfigurationException, SAXException, IOException {
if (xmlInputStream == null) {
throw new IllegalArgumentException("Input stream cannot be null");
}
initializeInternal(xmlInputStream);
}
/**
* 内部初始化方法实际执行XML解析逻辑
*/
private static void initializeInternal(Object source)
throws ParserConfigurationException, SAXException, IOException {
if (initialized) {
return;
}
radionuclideData.clear();
nuclideToSection.clear();
dayValue = null;
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc;
if (source instanceof File) {
doc = dBuilder.parse((File) source);
} else if (source instanceof InputStream) {
doc = dBuilder.parse((InputStream) source);
} else {
throw new IllegalArgumentException("Unsupported source type");
}
doc.getDocumentElement().normalize();
NodeList sectionList = doc.getElementsByTagName("section");
for (int i = 0; i < sectionList.getLength(); i++) {
Node sectionNode = sectionList.item(i);
if (sectionNode.getNodeType() == Node.ELEMENT_NODE) {
Element sectionElement = (Element) sectionNode;
String sectionName = sectionElement.getAttribute("name");
if (sectionName == null || sectionName.trim().isEmpty()) {
log.error("Skipping section with empty name attribute");
continue;
}
if (radionuclideData.containsKey(sectionName)) {
log.error("Duplicate section name found: " + sectionName + ", skipping");
continue;
}
if ("Days".equals(sectionName)) {
// 只读取第一个value元素的值
NodeList valueList = sectionElement.getElementsByTagName("value");
if (valueList.getLength() > 0) {
Node valueNode = valueList.item(0);
if (valueNode.getNodeType() == Node.ELEMENT_NODE) {
try {
dayValue = Integer.parseInt(valueNode.getTextContent().trim());
} catch (NumberFormatException e) {
System.err.println("Invalid days format: " + valueNode.getTextContent());
}
}
} else {
System.err.println("Section 'Days' has no 'value' element");
}
} else {
Set<String> nuclideSet = new HashSet<>();
NodeList nuclideList = sectionElement.getElementsByTagName("nuclide");
for (int j = 0; j < nuclideList.getLength(); j++) {
Node nuclideNode = nuclideList.item(j);
if (nuclideNode.getNodeType() == Node.ELEMENT_NODE) {
String nuclideValue = nuclideNode.getTextContent().trim();
if (!nuclideValue.isEmpty()) {
if (!nuclideSet.add(nuclideValue)) {
System.out.println("Duplicate nuclide found in section " + sectionName + ": " + nuclideValue);
}
}
}
}
List<String> nuclides = new ArrayList<>(nuclideSet);
radionuclideData.put(sectionName, Collections.unmodifiableList(nuclides));
// 构建核素到分类的反向映射
for (String nuclide : nuclides) {
if (nuclideToSection.containsKey(nuclide)) {
System.out.println("Nuclide " + nuclide + " exists in multiple sections: " +
nuclideToSection.get(nuclide) + " and " + sectionName);
} else {
nuclideToSection.put(nuclide, sectionName);
}
}
}
}
}
initialized = true;
}
/**
* 获取天数值只返回一个值
*
* @return 天数如果未设置则返回null
*/
public static Integer getDayValue() {
checkInitialized();
return dayValue;
}
/**
* 获取指定分类的所有核素
*
* @param sectionName 分类名称
* @return 核素列表不可修改如果分类不存在则返回空列表
* @throws IllegalStateException 如果未初始化
*/
public static List<String> getNuclidesBySection(String sectionName) {
checkInitialized();
return radionuclideData.getOrDefault(sectionName, Collections.emptyList());
}
/**
* 获取所有分类名称
*
* @return 分类名称列表不可修改
* @throws IllegalStateException 如果未初始化
*/
public static List<String> getAllSections() {
checkInitialized();
return Collections.unmodifiableList(new ArrayList<>(radionuclideData.keySet()));
}
/**
* 获取所有核素不区分分类
*
* @return 所有核素的列表不可修改
* @throws IllegalStateException 如果未初始化
*/
public static List<String> getAllNuclides() {
checkInitialized();
// 汇总所有分类的核素并去重
Set<String> allNuclideSet = new HashSet<>();
for (List<String> nuclides : radionuclideData.values()) {
allNuclideSet.addAll(nuclides);
}
return Collections.unmodifiableList(new ArrayList<>(allNuclideSet));
}
/**
* 根据核素名获取其所属的分类
*
* @param nuclide 核素名称
* @return 核素所属的分类名称如果核素不存在则返回null
* @throws IllegalStateException 如果未初始化
*/
public static String getSectionByNuclide(String nuclide) {
checkInitialized();
if (nuclide == null || nuclide.trim().isEmpty()) {
return null;
}
return nuclideToSection.get(nuclide.trim());
}
/**
* 检查是否已初始化
*
* @throws IllegalStateException 如果未初始化
*/
private static void checkInitialized() {
if (!initialized) {
throw new IllegalStateException("RadionuclideManager 尚未初始化,请先调用 initialize() 方法");
}
}
public static void main(String[] args) {
try {
// 程序启动时初始化
RadionuclideUtil.initialize("F:\\Work_MDC\\AnalysisSystemForRadionuclide\\jeecg-boot-base-core\\src\\main\\resources\\ctbt_radionuclides.xml");
// 测试新添加的方法
String testNuclide1 = "K40";
System.out.println(testNuclide1 + " 所属类型: " + RadionuclideUtil.getSectionByNuclide(testNuclide1));
String testNuclide2 = "Cs137";
System.out.println(testNuclide2 + " 所属类型: " + RadionuclideUtil.getSectionByNuclide(testNuclide2));
String testNuclide3 = "Unknown";
System.out.println(testNuclide3 + " 所属类型: " + RadionuclideUtil.getSectionByNuclide(testNuclide3));
// 原有功能测试
System.out.println("\n所有分类: " + RadionuclideUtil.getAllSections());
String ctbtSection = "CTBTRADS";
System.out.println("\n" + ctbtSection + " 包含的核素数量: " +
RadionuclideUtil.getNuclidesBySection(ctbtSection).size());
String naturalSection = "NATURALRADS";
System.out.println(naturalSection + " 包含的核素: " +
RadionuclideUtil.getNuclidesBySection(naturalSection));
System.out.println("所有核素总数: " + RadionuclideUtil.getAllNuclides().size());
System.out.println("天数值: " + RadionuclideUtil.getDayValue());
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
}

View File

@ -198,15 +198,6 @@ public class RedisStreamUtil {
// 向Redis Stream中推送消息
return putRecord(record);
}
/**
* 添加消息到 Stream (对象格式)
*/
public <T> RecordId addMessage(String streamKey, T message) {
ObjectRecord<String, T> record = StreamRecords.newRecord()
.in(streamKey)
.ofObject(message);
return stringRedisTemplate.opsForStream().add(record);
}
public void setSilence(Map<String, Long> silenceMap){
// 返回批处理的执行结果

View File

@ -61,42 +61,13 @@ public class TemplateUtil {
for (String key : keys) {
contents.add(ReUtil.getGroup1(StrUtil.format(pattern, key), templateContent));
}
String join = StrUtil.SPACE+ "#"+StrUtil.SPACE;
templateContent = CollUtil.join(contents, join);
templateContent = CollUtil.join(contents, "#");
String content = FreemarkerParseFactory
.parseTemplateContent(templateContent, data, true);
messageDTO.setContent(content);
String title = FreemarkerParseFactory.parseTemplateContent(templateName,data);
messageDTO.setTitle(title);
return messageDTO;
}
public static MessageDTO parse1(String code, Map<String, Object> data,Map<String,Object> stationData){
MessageDTO messageDTO = new MessageDTO();
SysMessageTemplate template = templateService.getOne(code);
// 如果没有消息模板
if(ObjectUtil.isNull(template))
return messageDTO;
String templateName = template.getTemplateName();
String templateContent = template.getTemplateContent();
if (MapUtil.isEmpty(data))
return messageDTO;
Set<String> keys = data.keySet();
String pattern = "\\<([^<>]*{}[^<>]*)\\>";
List<String> contents = new ArrayList<>();
for (String key : keys) {
contents.add(ReUtil.getGroup1(StrUtil.format(pattern, key), templateContent));
}
String replaceStr=System.lineSeparator();
String join = replaceStr+ "#";
templateContent = CollUtil.join(contents, join);
String content = FreemarkerParseFactory
.parseTemplateContent(templateContent, data, true);
messageDTO.setContent(content.replace(":",":"+replaceStr+StrUtil.SPACE));
String title = FreemarkerParseFactory.parseTemplateContent(templateName,stationData);
messageDTO.setTitle(title);
return messageDTO;
}
public static MessageDTO parse(String title, String code, Map<String, Object> data) {
MessageDTO messageDTO = new MessageDTO();
SysMessageTemplate template = templateService.getOne(code);
@ -131,8 +102,7 @@ public class TemplateUtil {
for (String key : keys) {
contents.add(ReUtil.getGroup1(StrUtil.format(pattern, key), templateContent));
}
String join = StrUtil.SPACE + "#" + StrUtil.SPACE;
templateContent = CollUtil.join(contents, join);
templateContent = CollUtil.join(contents, "#");
String content = FreemarkerParseFactory
.parseTemplateContent(templateContent, data, true);
messageDTO.setContent(content);

View File

@ -164,8 +164,8 @@ public class TokenUtils {
String secret = CommonConstant.TEMP_TOKEN_SECRET;
// 模拟登录生成Token
String token = JwtUtil.sign(username, secret);
// 设置Token缓存有效时间为 60
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token, 60);
// 设置Token缓存有效时间为 3 分钟
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token, 3 * 60);
return token;
}
}

View File

@ -1,28 +0,0 @@
package org.jeecg.config.mybatis;
import org.apache.ibatis.mapping.DatabaseIdProvider;
import org.apache.ibatis.mapping.VendorDatabaseIdProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Properties;
@Configuration
public class MybatisDatabaseConfig {
@Bean
public DatabaseIdProvider databaseIdProvider(){
VendorDatabaseIdProvider provider =
new VendorDatabaseIdProvider();
Properties properties = new Properties();
properties.setProperty("Oracle", "oracle");
properties.setProperty("PostgreSQL", "postgresql");
properties.setProperty("MySQL", "mysql");
provider.setProperties(properties);
return provider;
}
}

View File

@ -70,16 +70,6 @@ public class MybatisInterceptor implements Interceptor {
field.setAccessible(false);
}
}
if ("moddate".equalsIgnoreCase(field.getName())) {
field.setAccessible(true);
Object localCreateDate = field.get(parameter);
field.setAccessible(false);
if (localCreateDate == null || "".equals(localCreateDate)) {
field.setAccessible(true);
field.set(parameter, new Date());
field.setAccessible(false);
}
}
//注入部门编码
if ("sysOrgCode".equals(field.getName())) {
field.setAccessible(true);

View File

@ -52,7 +52,7 @@ public class ShiroConfig {
/**
* Filter Chain定义说明
* <p>
*
* 1一个URL可以配置多个Filter使用逗号分隔
* 2当设置多个过滤器时全部验证通过才视为通过
* 3部分过滤器可指定参数如permsroles
@ -65,12 +65,12 @@ public class ShiroConfig {
Map<String, String> filterChainDefinitionMap = new LinkedHashMap<String, String>();
//支持yml方式配置拦截排除
if (jeecgBaseConfig != null && jeecgBaseConfig.getShiro() != null) {
if(jeecgBaseConfig!=null && jeecgBaseConfig.getShiro()!=null){
String shiroExcludeUrls = jeecgBaseConfig.getShiro().getExcludeUrls();
if (oConvertUtils.isNotEmpty(shiroExcludeUrls)) {
if(oConvertUtils.isNotEmpty(shiroExcludeUrls)){
String[] permissionUrl = shiroExcludeUrls.split(",");
for (String url : permissionUrl) {
filterChainDefinitionMap.put(url, "anon");
for(String url : permissionUrl){
filterChainDefinitionMap.put(url,"anon");
}
}
}
@ -119,14 +119,14 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/swagger**/**", "anon");
filterChainDefinitionMap.put("/webjars/**", "anon");
filterChainDefinitionMap.put("/v2/**", "anon");
filterChainDefinitionMap.put("/sys/annountCement/show/**", "anon");
//积木报表排除
filterChainDefinitionMap.put("/jmreport/**", "anon");
filterChainDefinitionMap.put("/**/*.js.map", "anon");
filterChainDefinitionMap.put("/**/*.css.map", "anon");
//大屏模板例子
filterChainDefinitionMap.put("/test/bigScreen/**", "anon");
filterChainDefinitionMap.put("/bigscreen/template1/**", "anon");
@ -140,16 +140,6 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/newsWebsocket/**", "anon");//CMS模块
filterChainDefinitionMap.put("/vxeSocket/**", "anon");//JVxeTable无痕刷新示例
//邮件监控 排除
filterChainDefinitionMap.put("/sysEmailLog/getDashboardDailyStats", "anon");
filterChainDefinitionMap.put("/sysEmailLog/getRecentEmailDatas", "anon");
filterChainDefinitionMap.put("/sysEmail/sourceList", "anon");
//台站有效率
filterChainDefinitionMap.put("/stationOperation/getDataProvisionEfficiency", "anon");
//接收告警消息
filterChainDefinitionMap.put("/alert", "anon");
//性能监控安全隐患泄露TOEKNdurid连接池也有
//filterChainDefinitionMap.put("/actuator/**", "anon");
//测试模块排除
@ -159,7 +149,7 @@ public class ShiroConfig {
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
//如果cloudServer为空 则说明是单体 需要加载跨域配置微服务跨域切换
Object cloudServer = env.getProperty(CommonConstant.CLOUD_SERVER_KEY);
filterMap.put("jwt", new JwtFilter(cloudServer == null));
filterMap.put("jwt", new JwtFilter(cloudServer==null));
shiroFilterFactoryBean.setFilters(filterMap);
// <!-- 过滤链定义从上向下顺序执行一般将/**放在最为下边
filterChainDefinitionMap.put("/**", "jwt");
@ -193,7 +183,6 @@ public class ShiroConfig {
/**
* 下面的代码是添加注解支持
*
* @return
*/
@Bean
@ -260,15 +249,15 @@ public class ShiroConfig {
redisManager.setPassword(lettuceConnectionFactory.getPassword());
}
manager = redisManager;
} else {
}else{
// redis集群支持优先使用集群配置
RedisClusterManager redisManager = new RedisClusterManager();
Set<HostAndPort> portSet = new HashSet<>();
lettuceConnectionFactory.getClusterConfiguration().getClusterNodes().forEach(node -> portSet.add(new HostAndPort(node.getHost(), node.getPort())));
lettuceConnectionFactory.getClusterConfiguration().getClusterNodes().forEach(node -> portSet.add(new HostAndPort(node.getHost() , node.getPort())));
//update-begin--Author:scott Date:20210531 for修改集群模式下未设置redis密码的bug issues/I3QNIC
if (oConvertUtils.isNotEmpty(lettuceConnectionFactory.getPassword())) {
JedisCluster jedisCluster = new JedisCluster(portSet, 2000, 2000, 5,
lettuceConnectionFactory.getPassword(), new GenericObjectPoolConfig());
lettuceConnectionFactory.getPassword(), new GenericObjectPoolConfig());
redisManager.setPassword(lettuceConnectionFactory.getPassword());
redisManager.setJedisCluster(jedisCluster);
} else {

View File

@ -0,0 +1,12 @@
package org.jeecg.modules.base.bizVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jeecg.common.api.QueryRequest;
@Data
public class AlertSystemVo extends QueryRequest {
private String code;
private String content;
}

View File

@ -27,42 +27,4 @@ public class AlarmAnalysisRuleInfo implements Serializable {
private String contactGroup;
private String remark;
private String sample;
private String sampleType;
private Integer coefficient;
private List<String> colTime;
private List<String> acqTime;
private Double airFlow;
private Double decayTime;
private Double sampVol;
private Double ba140MDC;
private Double be7FWHM;
private List<String> xe133MDC;
private Double xeVol;
private Integer xe131mFlag;
private Integer xe133mFlag;
private Integer xe133Flag;
private Integer xe135Flag;
private Integer days;
private String identifyNuclides;
private List<String> identifyNuclidesChecked;
}

View File

@ -43,16 +43,6 @@ public class BasicInfo {
private String cpuType;
private String biosVersion;
private String biosSupplier;
private String manufacturer;
private String modelNumber;
private String kernelVersion;
private double cpuUsed;
private double memoryUsed;

View File

@ -14,8 +14,6 @@ public class DatabaseDto implements Serializable {
private String name;
private String instance;
private String url;
private String type;

View File

@ -36,6 +36,4 @@ public class EmailDto implements Serializable {
private String username; // 邮箱用户名
private Integer isQiye; // 是否企业邮箱
private Integer emailServerType;
}

View File

@ -8,30 +8,25 @@ import org.jeecg.modules.base.enums.SourceType;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Map;
import java.util.Set;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class Info implements Serializable {
public class Info implements Serializable{
// 台站id
private String stationId;
// 谱id
private String sampleId;
//分析ID号
public String IdAnalysis;
// 谱Name
private String sampleName;
// 采样时间
private LocalDateTime collectionDate;
//采集停止时间
private Date collectStop;
// 数据源类型(ARMDARR=1|ARMDRRR=2|IDCARR=3|IDCRRR=4)
private String datasource;
@ -45,7 +40,7 @@ public class Info implements Serializable {
private String analyst;
// 核素名称-浓度值
private Map<String, String> nuclides;
private Map<String,String> nuclides;
/* 以下属性不需要传值 */
private String ruleId;
@ -53,8 +48,4 @@ public class Info implements Serializable {
private String groupId;
private String conditions;
private Set<String> identifyNuclideSet;
private String sampleType;
}

View File

@ -0,0 +1,12 @@
package org.jeecg.modules.base.dto;
import lombok.Data;
@Data
public class RoiDto {
private Integer roiNum;
private String phdPath;
}

View File

@ -1,11 +0,0 @@
package org.jeecg.modules.base.dto;
import lombok.Data;
@Data
public class SampNucl {
private String sampleId;
private String nuclideName;
}

View File

@ -14,9 +14,4 @@ public class SourceDto implements Serializable {
private String hostId;
private String cpuUsedItemId;
/**
* 是否启用邮箱0-不启用1-启用
*/
private Integer enabled;
}

View File

@ -1,17 +0,0 @@
package org.jeecg.modules.base.entity;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
@Data
public class GardsNuclThresholds implements Serializable {
private String id;
private String sampleId;
private String stationId;
private Double thresholdValue;
private String nuclideName;
private LocalDateTime calculationTime;
}

View File

@ -21,7 +21,7 @@ public class Rule implements Serializable {
StringBuilder sb = new StringBuilder();
units = StrUtil.isBlank(units) ? "" : units;
sb.append(name).append(StrUtil.SPACE).append(operator)
.append(StrUtil.SPACE).append(threshold).append(StrUtil.SPACE).append(units);
.append(StrUtil.SPACE).append(threshold).append(units);
return sb.toString();
}
}

View File

@ -1,18 +0,0 @@
package org.jeecg.modules.base.entity;
import lombok.Data;
import java.io.Serializable;
@Data
public class SampleGardsThreshold implements Serializable {
/**
* 样品id
*/
private Integer sampleId;
private String sampleType;
private Integer stationId;
private String Grading;
private String GradingStatus;
}

View File

@ -1,23 +0,0 @@
package org.jeecg.modules.base.entity;
import lombok.Data;
@Data
public class SampleIdentifiedNuclides {
private Integer sampleId;
/**
* 分析ID号
*/
private Integer idAnalysis;
/**
* 核素名称
*/
private String nuclideName;
/**
* 活度浓度
*/
private String concentration;
}

View File

@ -1,15 +0,0 @@
package org.jeecg.modules.base.entity;
import lombok.Data;
import java.util.Date;
@Data
public class StatisticsResult {
private String nuclideName;
private Double median; // 中位数
private Double percentile25; // 25分位数
private Double percentile75; // 75分位数
private int dataCount; // 有效数据量
private Date collectStop;
}

View File

@ -1,17 +0,0 @@
package org.jeecg.modules.base.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class ThresholdMetric implements Serializable {
private Integer stationId;//站点ID
private Integer sampleId;//样品ID
private String nuclideName;//核素名称
private String concentration;//浓度值
private Date collectStop;//采集停止时间
private List<Double> concentrations;// 浓度列表
}

View File

@ -1,13 +0,0 @@
package org.jeecg.modules.base.entity;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class ThresholdMetricResults {
private Integer stationId;//站点ID
private String nuclideName;//核素名称
private Date collectStop;//采集停止时间
private List<Double> concentrations;// 浓度列表
}

View File

@ -0,0 +1,35 @@
package org.jeecg.modules.base.entity.configuration;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("CONFIGURATION.GARDS_ALERT_SYSTEM")
public class GardsAlertSystem implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
private String id;
private String type;
private String code;
private String content;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date moddate;
@TableField(exist = false)
private String typeStr;
public GardsAlertSystem(){ moddate = new Date(); }
}

View File

@ -1,6 +1,5 @@
package org.jeecg.modules.base.entity.configuration;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@ -23,7 +22,7 @@ public class GardsDetectors implements Serializable {
/**
* 探测器id
*/
@TableId(value="detector_id",type = IdType.INPUT)
@TableId(value = "DETECTOR_ID")
private Integer detectorId;
/**

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

View File

@ -1,6 +1,5 @@
package org.jeecg.modules.base.entity.configuration;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@ -20,57 +19,57 @@ import java.util.Date;
public class GardsStations implements Serializable {
/**
* 台站id
* 台站id
*/
@TableId(value = "station_id", type = IdType.INPUT)
@TableId("STATION_ID")
@NotNull(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
private Integer stationId;
/**
* 台站编码
* 台站编码
*/
@TableField(value = "STATION_CODE")
@NotBlank(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
private String stationCode;
/**
* 城市编码
* 城市编码
*/
@TableField(value = "COUNTRY_CODE")
private String countryCode;
/**
* 台站类型
* 台站类型
*/
@TableField(value = "TYPE")
private String type;
/**
* 经度
* 经度
*/
@TableField(value = "LON")
private Double lon;
/**
* 纬度
* 纬度
*/
@TableField(value = "LAT")
private Double lat;
/**
* 海拔
* 海拔
*/
@TableField(value = "ELEVATION")
private Double elevation;
/**
* 描述
* 描述
*/
@TableField(value = "DESCRIPTION")
private String description;
/**
* 开始运行日期
* 开始运行日期
*/
@TableField(value = "DATE_BEGIN")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ -86,13 +85,13 @@ public class GardsStations implements Serializable {
private Date dateEnd;
/**
* 运行状态
* 运行状态
*/
@TableField(value = "STATUS")
private String status;
/**
* 操作时间
* 操作时间
*/
@TableField(value = "MODDATE")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ -102,9 +101,4 @@ public class GardsStations implements Serializable {
@TableField(value = "CATEGORY")
private Integer category;
/**
* 有效率计算类型
*/
@TableField(value = "EFFIC_CALCUL_TYPE")
private String efficCalculType;
}

View File

@ -1,6 +1,9 @@
package org.jeecg.modules.base.entity.original;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
@ -19,7 +22,7 @@ public class GardsAlertData implements Serializable {
@TableField(value = "STATION_CODE")
private String stationCode;
@TableId(value="alert_id",type = IdType.AUTO)
@TableId(value = "ALERT_ID",type = IdType.AUTO)
private Integer alertId;
@TableField(value = "TIME")

View File

@ -1,6 +1,7 @@
package org.jeecg.modules.base.entity.original;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@ -18,7 +19,7 @@ public class GardsGPSData implements Serializable {
@TableField(value = "STATION_CODE")
private String stationCode;
@TableId(value="gps_id",type = IdType.AUTO)
@TableField(value = "GPS_ID")
private Integer gpsId;
@TableField(value = "LON")

View File

@ -1,6 +1,9 @@
package org.jeecg.modules.base.entity.original;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
@ -28,7 +31,7 @@ public class GardsMetData implements Serializable {
/**
* 气象数据id
*/
@TableId(value="met_id",type = IdType.AUTO)
@TableId(value = "MET_ID",type = IdType.AUTO)
private Integer metId;
/**

View File

@ -1,6 +1,9 @@
package org.jeecg.modules.base.entity.original;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
@ -24,7 +27,7 @@ public class GardsSampleData implements Serializable {
* 样品id
*/
@TableId(value = "sample_id",type = IdType.AUTO)
@TableId(value = "SAMPLE_ID",type = IdType.AUTO)
private Integer sampleId;
/**

View File

@ -1,6 +1,9 @@
package org.jeecg.modules.base.entity.original;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
@ -28,7 +31,7 @@ public class GardsSohData implements Serializable {
/**
* 报警ID号
*/
@TableId(value = "soh_id",type = IdType.AUTO)
@TableId(value = "SOH_ID",type = IdType.AUTO)
@Excel(name = "SID",orderNum = "5")
private Integer sohId;

View File

@ -0,0 +1,51 @@
package org.jeecg.modules.base.entity.original;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("ORIGINAL.SAMPLE_WATER_RESULT")
public class SampleWaterResult implements Serializable {
@TableField(value = "SAMPLE_RESULT_ID")
private Integer sampleResultId;
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
@TableField(value = "NUCLIDE_NAME")
private String nuclideName;
@TableField(value = "ENERGY")
private Double energy;
@TableField(value = "CSC_RATIO")
private Double cscRatio;
@TableField(value = "HALF_LIFE")
private Double halfLife;
@TableField(value = "MDA")
private Double mda;
@TableField(value = "ACTIVITY")
private Double activity;
@TableField(value = "SPEC_ACTIVITY")
private Double specActivity;
@TableField(value = "NID_FLAG")
private Integer nidFlag;
@TableField(value = "MODDATE")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date moddate;
}

View File

@ -2,9 +2,16 @@ package org.jeecg.modules.base.entity.postgre;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javafx.util.converter.LocalDateTimeStringConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@ -12,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecg.modules.base.dto.NuclideInfo;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
@Data
@TableName("alarm_analysis_log")

View File

@ -1,11 +1,21 @@
package org.jeecg.modules.base.entity.postgre;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
@Data
@TableName("alarm_analysis_nuclide_param")

View File

@ -1,12 +1,21 @@
package org.jeecg.modules.base.entity.postgre;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.system.base.entity.JeecgEntity;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.scheduling.annotation.Scheduled;
@Data
@TableName("alarm_analysis_rule")
@ -14,9 +23,6 @@ import java.math.BigDecimal;
@Accessors(chain = true)
public class AlarmAnalysisRule extends JeecgEntity {
@TableId(value = "id", type = IdType.ASSIGN_ID)
private String id;
/** 规则名称 */
private String name;
@ -41,55 +47,6 @@ public class AlarmAnalysisRule extends JeecgEntity {
/** 联系人组id */
private String contactGroup;
private String sample;
private String sampleType;
private BigDecimal coefficient;
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String colTime;
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String acqTime;
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Double airFlow;
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Double decayTime;
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Double sampVol;
@TableField(value = "ba140_mdc", updateStrategy = FieldStrategy.IGNORED)
private Double ba140MDC;
@TableField(value = "be7_fwhm", updateStrategy = FieldStrategy.IGNORED)
private Double be7FWHM;
@TableField(value = "xe133_mdc", updateStrategy = FieldStrategy.IGNORED)
private String xe133MDC;
@TableField(value = "xe_vol", updateStrategy = FieldStrategy.IGNORED)
private Double xeVol;
@TableField(value = "xe131m_flag", updateStrategy = FieldStrategy.IGNORED)
private Integer xe131mFlag;
@TableField(value = "xe133m_flag", updateStrategy = FieldStrategy.IGNORED)
private Integer xe133mFlag;
@TableField(value = "xe133_flag", updateStrategy = FieldStrategy.IGNORED)
private Integer xe133Flag;
@TableField(value = "xe135_flag", updateStrategy = FieldStrategy.IGNORED)
private Integer xe135Flag;
private Integer days;
@TableField(value = "identify_nuclides", updateStrategy = FieldStrategy.IGNORED)
private String identifyNuclides;
/** 备注 */
private String remark;
}

View File

@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecg.common.constant.DateConstant;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data

View File

@ -5,7 +5,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
@Data

View File

@ -9,6 +9,7 @@ import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
@Data

View File

@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
@ -92,7 +94,4 @@ public class SysEmail implements Serializable {
*/
@TableField(value = "update_by")
private String updateBy;
@TableField(value = "email_server_type")
private Integer emailServerType;
}

View File

@ -1,6 +1,9 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@ -18,7 +21,7 @@ public class GardsAnalyses implements Serializable {
/**
* 分析ID号
*/
@TableId(value = "idanalysis",type = IdType.AUTO)
@TableId(value = "IDANALYSIS",type = IdType.AUTO)
private Integer idAnalysis;
/**
* 样品id

View File

@ -0,0 +1,48 @@
package org.jeecg.modules.base.entity.rnauto;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
@Data
@TableName("RNAUTO.GARDS_ANALYSIS_ROI")
@Accessors(chain = true)
public class GardsAnalysisRoi {
@TableField("IDANALYSIS")
private Integer idAnalysis;
private Integer sampleId;
private Integer roiId;
private Integer roiNum;
private Double minX;
private Double maxX;
private Double minY;
private Double maxY;
private String phdPath;
private String baselinePath;
private String lcPath;
private String scacPath;
private String logPath;
private String reportPath;
}

View File

@ -41,7 +41,7 @@ public class GardsCalibration implements Serializable {
/**
* 拟合方程ID号统一定义
*/
@TableField(value = "\"function\"")
@TableField(value = "FUNCTION")
private Integer function;
/**
* 拟合方程描述

View File

@ -0,0 +1,74 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储数据分析过程中能量分辨率和效率刻度实际使用的刻度点数据
*/
@Data
@TableName("RNAUTO.GARDS_CALIBRATION_PAIRS_ROI")
public class GardsCalibrationPairsRoi implements Serializable {
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
private Integer roiId;
/**
* Ggamma探测器的数据#g_Bbeta探测器的数据,#b_
*/
@TableField(value = "SAMPLE_TYPE")
private String sampleType;
/**
* energy能量刻度
* efficiency效率刻度
* Resolution分辨率刻度
*/
@TableField(value = "CALTYPE")
private String caltype;
/**
* PHD代表数据来自PHD文件External代表数据来自外部如刻度工具其它文件等
*/
@TableField(value = "INPUT")
private String input;
/**
* 刻度点ID号
*/
@TableField(value = "IDCALPOINT")
private Integer idCalPoint;
@TableField(value = "XVALUE")
private Double xValue;
@TableField(value = "YVALUE")
private Double yValue;
@TableField(value = "DECAY_MODE")
private String decayMode;
/**
* y值不确定度
*/
@TableField(value = "UNCYVALUE")
private Double uncYValue;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
}

View File

@ -0,0 +1,119 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储数据分析过程中能量分辨率和效率刻度的拟合结果
*/
@Data
@TableName("RNAUTO.GARDS_CALIBRATION_ROI")
public class GardsCalibrationRoi implements Serializable {
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
/**
* Ggamma探测器的数据#g_Bbeta探测器的数据,#b_
*/
@TableField(value = "SAMPLE_TYPE")
private String sampleType;
/**
* energy能量刻度
* efficiency效率刻度
* Resolution分辨率刻度
*/
@TableField(value = "CALTYPE")
private String calType;
/**
* 拟合方程ID号统一定义
*/
@TableField(value = "FUNCTION")
private Integer function;
/**
* 拟合方程描述
*/
@TableField(value = "FUNCTIONDEF")
private String functionDef;
/**
* 拟合的起始值
*/
@TableField(value = "STARTOFRANGE")
private Integer startOfRange;
/**
* 拟合的结束值
*/
@TableField(value = "ENDOFRANGE")
private Integer endOfRange;
/**
* 拟合系数1
*/
@TableField(value = "COEFF1")
private Double coeff1;
/**
* 拟合系数2
*/
@TableField(value = "COEFF2")
private Double coeff2;
/**
* 拟合系数3
*/
@TableField(value = "COEFF3")
private Double coeff3;
/**
* 拟合系数4
*/
@TableField(value = "COEFF4")
private Double coeff4;
/**
* 拟合系数5
*/
@TableField(value = "COEFF5")
private Double coeff5;
/**
* 拟合系数6
*/
@TableField(value = "COEFF6")
private Double coeff6;
/**
* 拟合系数7
*/
@TableField(value = "COEFF7")
private Double coeff7;
/**
* 拟合系数8
*/
@TableField(value = "COEFF8")
private Double coeff8;
/**
* 拟合系数9
*/
@TableField(value = "COEFF9")
private Double coeff9;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
@TableField(value = "COEFF_STRING")
private String coeffString;
}

View File

@ -0,0 +1,48 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("RNAUTO.GARDS_MDC_ROI")
public class GardsMDCRoi implements Serializable {
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
@TableField(value = "NUCLIDENAME")
private String nuclideName;
@TableField(value = "ENERGY")
private Double energy;
@TableField(value = "YIELD")
private Double yield;
@TableField(value = "EFFICIENCY")
private Double efficiency;
@TableField(value = "MDC")
private String mdc;
@TableField(value = "MDC_ERR")
private String mdcErr;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
}

View File

@ -0,0 +1,122 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储gamma谱中识别到的核素计算结果
*/
@Data
@TableName("RNAUTO.GARDS_NUCL_IDED_ROI")
public class GardsNuclIdedRoi implements Serializable {
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
/**
* 核素名称
*/
@TableField(value = "NUCLIDENAME")
private String nuclideName;
/**
* 核素类型
*/
@TableField(value = "TYPE")
private String type;
/**
* 核素半衰期
*/
@TableField(value = "HALFLIFE")
private String halflife;
/**
* 平均活度值
*/
@TableField(value = "AVE_ACTIV")
private String aveActiv;
/**
* 平均活度值不确定度
*/
@TableField(value = "AVE_ACTIV_ERR")
private Double aveActivErr;
/**
* 主射线活度值
*/
@TableField(value = "ACTIV_KEY")
private Double activKey;
/**
* 主射线活度值不确定度
*/
@TableField(value = "ACTIV_KEY_ERR")
private Double activKeyErr;
/**
* 核素的最小可探测活度
*/
@TableField(value = "MDA")
private String mda;
/**
* 核素的最小可探测活度不确定度
*/
@TableField(value = "MDA_ERR")
private Double mdaErr;
/**
* 核素识别标志
*/
@TableField(value = "NID_FLAG")
private Integer nidFlag;
@TableField(value = "ACTIV_DECAY")
private Double activDecay;
@TableField(value = "ACTIV_DECAY_ERR")
private Double activDecayErr;
/**
* 符合相加校正因子无设为1
*/
@TableField(value = "CSC_RATIO")
private Double cscRatio;
/**
* 符合相加校正因子不确定度无设为0
*/
@TableField(value = "CSC_RATIO_ERR")
private Double cscRatioErr;
/**
* 活度是否经过符合相加校正
*/
@TableField(value = "CSC_MOD_FLAG")
private Integer cscModFlag;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
@TableField(value = "MDC")
private String mdc;
@TableField(value = "CONCENTRATION")
private String concentration;
@TableField(value = "KEY_ENERGY")
private String keyEnergy;
@TableField(value = "KEY_YIELD")
private String keyYield;
}

View File

@ -0,0 +1,126 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储gamma谱中识别到的峰计算结果
*/
@Data
@TableName("RNAUTO.GARDS_NUCL_LINES_IDED_ROI")
public class GardsNuclLinesIdedRoi implements Serializable {
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
@TableField(value = "ROI_ID")
private Integer roiId;
/**
* 峰序号
*/
@TableField(value = "IDPEAK")
private Integer idPeak;
/**
* 核素名称
*/
@TableField(value = "NUCLIDENAME")
private String nuclideName;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
/**
* 核素库中核素对应峰的能量keV
*/
@TableField(value = "ENERGY")
private Double energy;
/**
* 核素库中核素对应峰的能量不确定度keV
*/
@TableField(value = "UNCENERGY")
private Double uncEnergy;
/**
* 核素库中核素对应峰的发射几率
*/
@TableField(value = "ABUNDANCE")
private Double abundance;
/**
* 核素库中核素对应峰的发射几率不确定度
*/
@TableField(value = "UNCABUNDANCE")
private Double uncAbundance;
/**
* 利用该峰计算得到的活度
*/
@TableField(value = "ACTIVITY")
private String activity;
/**
* 利用该峰计算得到的活度不确定度
*/
@TableField(value = "UNCACTIVITY")
private Double uncActivity;
/**
* 该峰处的探测效率
*/
@TableField(value = "EFFIC")
private Double effic;
/**
* 该峰处的探测效率不确定度
*/
@TableField(value = "UNEFFIC")
private Double unEffic;
/**
* 利用该峰计算得到的最小可探测活度
*/
@TableField(value = "MDA")
private Double mda;
/**
* 主射线标识01
*/
@TableField(value = "KEY_FLAG")
private Double keyFlag;
/**
* 符合相加校正因子无设为1
*/
@TableField(value = "CSC_RATIO")
private Double cscRatio;
/**
* 符合相加校正因子不确定度无设为0
*/
@TableField(value = "CSC_RATIO_ERR")
private Double cscRatioErr;
/**
* 活度是否经过符合相加校正
*/
@TableField(value = "CSC_MOD_FLAG")
private Double cscModFlag;
@TableField(value = "NUCLIDEFULLNAME")
private String nuclidefullname;
@TableField(value = "MDC")
private String mdc;
@TableField(value = "CONCENTRATION")
private String concentration;
}

View File

@ -0,0 +1,166 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储gamma谱的寻峰结果
*/
@Data
@TableName("RNAUTO.GARDS_PEAKS_ROI")
public class GardsPeaksRoi implements Serializable {
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
/**
* 峰序号
*/
@TableField(value = "IDPEAK")
private Integer idPeak;
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
/**
* 峰中心道道址
*/
@TableField(value = "CENTROIDCHANNEL")
private Double centroidChannel;
/**
* 峰中心道不确定度道址
*/
@TableField(value = "UNCCENTROIDCHANNEL")
private Double uncCentroidChannel;
/**
* 峰中心道能量keV
*/
@TableField(value = "ENERGY")
private Double energy;
/**
* 峰中心道能量不确定度keV
*/
@TableField(value = "UNCENERGY")
private Double uncEnergy;
/**
* 峰面积计数已扣除基线面积但未扣除空白样品计数和探测器本底计数
*/
@TableField(value = "AREA")
private Double area;
/**
* 峰面积不确定度计数
*/
@TableField(value = "UNCAREA")
private Double uncArea;
/**
* 峰的净计数率1/s=峰面积/活时间
*/
@TableField(value = "NETCOUNTRATE")
private Double netCountRate;
/**
* 峰的净计数率的不确定度1/s
*/
@TableField(value = "UNCNETCOUNTRATE")
private Double uncNetCountRate;
/**
* 测量系统在峰能量处的绝对效率
*/
@TableField(value = "EFFICIENCY")
private Double efficiency;
/**
* 测量系统在峰能量处的绝对效率的不确定度
*/
@TableField(value = "UNCEFFICIENCY")
private Double uncefficiency;
/**
* 峰的半高宽
*/
@TableField(value = "FWHM")
private Double fwhm;
/**
* 峰的十分之一高宽
*/
@TableField(value = "FWTM")
private Double fwtm;
/**
* 峰的重要性因子
*/
@TableField(value = "SIGNIFICANCE")
private Double significance;
/**
* 峰的可探测线Lc
*/
@TableField(value = "LC")
private Double lc;
/**
* 峰的感兴趣区的起始道
*/
@TableField(value = "ROISTART")
private Double roiStart;
/**
* 峰的感兴趣区的结束道
*/
@TableField(value = "ROIEND")
private Double roiEnd;
@TableField(value = "MULTIINDEX")
private Double mulitiIndex;
@TableField(value = "TAIL")
private Double tail;
@TableField(value = "TAILALPHA")
private Double tailAlpha;
@TableField(value = "UPPERTAIL")
private Double upperTail;
@TableField(value = "UPPERTAILALPHA")
private Double upperTailAlpha;
@TableField(value = "BWWIDTHCHAN")
private Double bwwidthchan;
@TableField(value = "RECOILDELTACHAN")
private Double recoildeltachan;
@TableField(value = "STEPRAIO")
private Double stepraio;
@TableField(value = "LD")
private Double ld;
@TableField(value = "SENSITIVITY")
private Double sensitivity;
@TableField(value = "BACKGROUNDAREA")
private Double backgroundarea;
@TableField(value = "MEANBACKCOUNT")
private Double meanbackcount;
@TableField(value = "RECOILBETACHAN")
private Double recoilbetachan;
@TableField(value = "PEAKCOMMENTS")
private String peakcomments;
}

View File

@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import sun.security.krb5.internal.PAData;
import java.io.Serializable;
import java.util.Date;

View File

@ -0,0 +1,42 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName(value = "RNAUTO.GARDS_QC_CHECK_ROI")
public class GardsQcCheckRoi implements Serializable {
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
@TableField(value = "QC_NAME")
private String qcName;
@TableField(value = "QC_VALUE")
private Double qcValue;
@TableField(value = "QC_STANDARD")
private String qcStandard;
@TableField(value = "QC_RESULT")
private Integer qcResult;
@TableField(value = "MODDATE")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date moddate;
}

View File

@ -1,47 +0,0 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("RNAUTO.GARDS_SAMPLE_GRADING")
public class GardsSampleGrading {
/**
* 样品ID (对应 SAMPLE_ID)
*/
@TableField(value = "SAMPLE_ID")
private Long sampleId;
/**
* 台站ID (对应 STATION_ID)
*/
@TableField(value = "STATION_ID")
private Long stationId;
/**
* 分级结果 (对应 GRADING)
* 存储分级结果 "1", "2", "3"
*/
@TableField(value = "GRADING")
private String grading;
/**
* 分级状态 (对应 GRADING_STATUS)
* 0: 未处理
* 1: 已处理
* -1: 处理失败
*/
@TableField(value = "GRADING_STATUS")
private Integer gradingStatus;
/**
* 样品类型 (对应 SAMPLE_TYPE)
* P: 颗粒样品
* B: 惰性气体样品
*/
@TableField(value = "SAMPLE_TYPE")
private String sampleType;
}

View File

@ -1,31 +0,0 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@TableName("RNAUTO.GARDS_THRESHOLD_RESULT")
public class GardsThresholdResult {
@TableId(type = IdType.ASSIGN_ID)
private String id;
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
private Integer stationId;
@TableField("NUCLIDENAME")
private String nuclideName;
private String category;
private Double thresholdValue;
private Double median;
private Double percentile25;
private Double percentile75;
@TableField(exist = false)
private Date calculationTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date collectStop;
}

View File

@ -1,33 +0,0 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@TableName("RNAUTO.GARDS_THRESHOLD_RESULT_HIS")
public class GardsThresholdResultHistory {
@TableId(type = IdType.ASSIGN_ID)
private String id;
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
private Integer stationId;
@TableField("NUCLIDENAME")
private String nuclideName;
private Double thresholdValue;
private Double median;
private Double percentile25;
private Double percentile75;
@TableField(exist = false)
private Date calculationTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date collectStop;
private String category;
}

View File

@ -1,52 +0,0 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecg.modules.base.enums.TransportTaskCloseStatusEnum;
import org.jeecg.modules.base.enums.TransportTaskStatusEnum;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("RNAUTO.GARDS_TRANSPORT_STATUS")
public class GardsTransportStatus implements Serializable {
/**
* 样品id
*/
@TableId(value = "SAMPLE_ID", type = IdType.INPUT)
private Integer sampleId;
/**
* 输运模拟状态-1执行失败0未开始1运行中2已完成3缺少气象数据
*/
@TableField(value = "TRANSPORT_STATUS")
private Integer transportStatus;
/**
* 输运模拟说明
*/
@TableField(value = "DESCRIPTION")
private String description;
/**
* 关闭状态(0-未关闭1-关闭)
*/
@TableField(value = "CLOSE_STATUS")
private Integer closeStatus;
/**
* 更新时间
*/
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
}

View File

@ -1,56 +0,0 @@
package org.jeecg.modules.base.entity.rnauto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 关联波形事件数据表
*/
@Data
@TableName("RNAUTO.GARDS_WAVEFORM_EVENT")
public class GardsWaveformEvent implements Serializable {
/**
* '样品id'
*/
@TableId(value = "SAMPLE_ID", type = IdType.INPUT)
private Integer sampleId;
/**
* IDC SRS文件关联的波形事件数
*/
@TableField(value = "IDC_EVENTS")
private Integer idcEvents;
/**
* 输运模拟产出的SRS文件关联的波形事件数
*/
@TableField(value = "NDC_EVENTS")
private Integer ndcEvents;
/**
* -1关联未成功0未关联1排队中2执行中3已关联
*/
@TableField(value = "STATUS")
private Integer status;
/**
* 说明
*/
@TableField(value = "DESCRIPTION")
private String description;
/**
* 更新时间
*/
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
}

View File

@ -61,7 +61,4 @@ public class GardsXeResults implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
@TableField(value = "ROI_PEAKFIT")
private String roiOrPeakFit;
}

View File

@ -0,0 +1,78 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName(value = "RNMAN.GARDS_ANALY_SETTING_ROI")
public class GardsAnalySettingRoi implements Serializable {
@TableField(value = "IDANALYSIS")
private Integer idanalysis;
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
private Integer roiId;
@TableField(value = "MODDATE")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date moddate;
@TableField(value = "ECUTANALYSIS_LOW")
private Double ecutanalysisLow;
@TableField(value = "ECUTANALYSIS_HIGH")
private Double ecutanalysisHigh;
@TableField(value = "ENERGYTOLERANCE")
private Double energytolerance;
@TableField(value = "CALIBRATIONPSS_HIGH")
private Double calibrationpssHigh;
@TableField(value = "CALIBRATIONPSS_LOW")
private Double calibrationpssLow;
@TableField(value = "BASEIMPROVEPSS")
private Double baseimprovepss;
@TableField(value = "PSS_LOW")
private Double pssLow;
@TableField(value = "K_BACK")
private Double KBack;
@TableField(value = "K_ALPHA")
private Double KAlpha;
@TableField(value = "K_BETA")
private Double KBeta;
@TableField(value = "RISKLEVELK")
private Double risklevelk;
@TableField(value = "BUPDATECAL")
private Integer bupdatecal;
@TableField(value = "KEEPCALPEAKSERCHPEAKS")
private Integer keepcalpeakserchpeaks;
@TableField(value = "REFTIME_ACT")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date reftimeAct;
@TableField(value = "REFTIME_CONC")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date reftimeConc;
}

View File

@ -1,8 +1,6 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@ -22,7 +20,7 @@ public class GardsAnalyses implements Serializable {
/**
* 分析ID号
*/
@TableId(value = "idanalysis",type = IdType.AUTO)
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
/**
* 样品id

View File

@ -0,0 +1,42 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@TableName("RNMAN.GARDS_ANALYSIS_ROI")
@Accessors(chain = true)
public class GardsAnalysisRoi {
@TableField("IDANALYSIS")
private Integer idAnalysis;
private Integer sampleId;
private Integer roiId;
private Integer roiNum;
private Double minX;
private Double maxX;
private Double minY;
private Double maxY;
private String phdPath;
private String baselinePath;
private String lcPath;
private String scacPath;
private String logPath;
private String reportPath;
}

View File

@ -41,7 +41,7 @@ public class GardsCalibration implements Serializable {
/**
* 拟合方程ID号统一定义
*/
@TableField(value = "\"function\"")
@TableField(value = "FUNCTION")
private Integer function;
/**
* 拟合方程描述

View File

@ -0,0 +1,74 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储数据分析过程中能量分辨率和效率刻度实际使用的刻度点数据
*/
@Data
@TableName("RNMAN.GARDS_CALIBRATION_PAIRS_ROI")
public class GardsCalibrationPairsRoi implements Serializable {
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
private Integer roiId;
/**
* Ggamma探测器的数据#g_Bbeta探测器的数据,#b_
*/
@TableField(value = "SAMPLE_TYPE")
private String sampleType;
/**
* energy能量刻度
* efficiency效率刻度
* Resolution分辨率刻度
*/
@TableField(value = "CALTYPE")
private String caltype;
/**
* PHD代表数据来自PHD文件External代表数据来自外部如刻度工具其它文件等
*/
@TableField(value = "INPUT")
private String input;
/**
* 刻度点ID号
*/
@TableField(value = "IDCALPOINT")
private Integer idCalPoint;
@TableField(value = "XVALUE")
private Double xValue;
@TableField(value = "YVALUE")
private Double yValue;
@TableField(value = "DECAY_MODE")
private String decayMode;
/**
* y值不确定度
*/
@TableField(value = "UNCYVALUE")
private Double uncYValue;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
}

View File

@ -0,0 +1,119 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储数据分析过程中能量分辨率和效率刻度的拟合结果
*/
@Data
@TableName("RNMAN.GARDS_CALIBRATION_ROI")
public class GardsCalibrationRoi implements Serializable {
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
/**
* Ggamma探测器的数据#g_Bbeta探测器的数据,#b_
*/
@TableField(value = "SAMPLE_TYPE")
private String sampleType;
/**
* energy能量刻度
* efficiency效率刻度
* Resolution分辨率刻度
*/
@TableField(value = "CALTYPE")
private String calType;
/**
* 拟合方程ID号统一定义
*/
@TableField(value = "FUNCTION")
private Integer function;
/**
* 拟合方程描述
*/
@TableField(value = "FUNCTIONDEF")
private String functionDef;
/**
* 拟合的起始值
*/
@TableField(value = "STARTOFRANGE")
private Integer startOfRange;
/**
* 拟合的结束值
*/
@TableField(value = "ENDOFRANGE")
private Integer endOfRange;
/**
* 拟合系数1
*/
@TableField(value = "COEFF1")
private Double coeff1;
/**
* 拟合系数2
*/
@TableField(value = "COEFF2")
private Double coeff2;
/**
* 拟合系数3
*/
@TableField(value = "COEFF3")
private Double coeff3;
/**
* 拟合系数4
*/
@TableField(value = "COEFF4")
private Double coeff4;
/**
* 拟合系数5
*/
@TableField(value = "COEFF5")
private Double coeff5;
/**
* 拟合系数6
*/
@TableField(value = "COEFF6")
private Double coeff6;
/**
* 拟合系数7
*/
@TableField(value = "COEFF7")
private Double coeff7;
/**
* 拟合系数8
*/
@TableField(value = "COEFF8")
private Double coeff8;
/**
* 拟合系数9
*/
@TableField(value = "COEFF9")
private Double coeff9;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
@TableField(value = "COEFF_STRING")
private String coeffString;
}

View File

@ -0,0 +1,48 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("RNMAN.GARDS_MDC_ROI")
public class GardsMDCRoi implements Serializable {
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
@TableField(value = "NUCLIDENAME")
private String nuclideName;
@TableField(value = "ENERGY")
private Double energy;
@TableField(value = "YIELD")
private Double yield;
@TableField(value = "EFFICIENCY")
private Double efficiency;
@TableField(value = "MDC")
private String mdc;
@TableField(value = "MDC_ERR")
private String mdcErr;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
}

View File

@ -0,0 +1,122 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储gamma谱中识别到的核素计算结果
*/
@Data
@TableName("RNMAN.GARDS_NUCL_IDED_ROI")
public class GardsNuclIdedRoi implements Serializable {
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
/**
* 核素名称
*/
@TableField(value = "NUCLIDENAME")
private String nuclideName;
/**
* 核素类型
*/
@TableField(value = "TYPE")
private String type;
/**
* 核素半衰期
*/
@TableField(value = "HALFLIFE")
private String halflife;
/**
* 平均活度值
*/
@TableField(value = "AVE_ACTIV")
private String aveActiv;
/**
* 平均活度值不确定度
*/
@TableField(value = "AVE_ACTIV_ERR")
private Double aveActivErr;
/**
* 主射线活度值
*/
@TableField(value = "ACTIV_KEY")
private Double activKey;
/**
* 主射线活度值不确定度
*/
@TableField(value = "ACTIV_KEY_ERR")
private Double activKeyErr;
/**
* 核素的最小可探测活度
*/
@TableField(value = "MDA")
private String mda;
/**
* 核素的最小可探测活度不确定度
*/
@TableField(value = "MDA_ERR")
private Double mdaErr;
/**
* 核素识别标志
*/
@TableField(value = "NID_FLAG")
private Integer nidFlag;
@TableField(value = "ACTIV_DECAY")
private Double activDecay;
@TableField(value = "ACTIV_DECAY_ERR")
private Double activDecayErr;
/**
* 符合相加校正因子无设为1
*/
@TableField(value = "CSC_RATIO")
private Double cscRatio;
/**
* 符合相加校正因子不确定度无设为0
*/
@TableField(value = "CSC_RATIO_ERR")
private Double cscRatioErr;
/**
* 活度是否经过符合相加校正
*/
@TableField(value = "CSC_MOD_FLAG")
private Integer cscModFlag;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
@TableField(value = "MDC")
private String mdc;
@TableField(value = "CONCENTRATION")
private String concentration;
@TableField(value = "KEY_ENERGY")
private String keyEnergy;
@TableField(value = "KEY_YIELD")
private String keyYield;
}

View File

@ -0,0 +1,126 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储gamma谱中识别到的峰计算结果
*/
@Data
@TableName("RNMAN.GARDS_NUCL_LINES_IDED_ROI")
public class GardsNuclLinesIdedRoi implements Serializable {
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
@TableField(value = "ROI_ID")
private Integer roiId;
/**
* 峰序号
*/
@TableField(value = "IDPEAK")
private Integer idPeak;
/**
* 核素名称
*/
@TableField(value = "NUCLIDENAME")
private String nuclideName;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
/**
* 核素库中核素对应峰的能量keV
*/
@TableField(value = "ENERGY")
private Double energy;
/**
* 核素库中核素对应峰的能量不确定度keV
*/
@TableField(value = "UNCENERGY")
private Double uncEnergy;
/**
* 核素库中核素对应峰的发射几率
*/
@TableField(value = "ABUNDANCE")
private Double abundance;
/**
* 核素库中核素对应峰的发射几率不确定度
*/
@TableField(value = "UNCABUNDANCE")
private Double uncAbundance;
/**
* 利用该峰计算得到的活度
*/
@TableField(value = "ACTIVITY")
private String activity;
/**
* 利用该峰计算得到的活度不确定度
*/
@TableField(value = "UNCACTIVITY")
private Double uncActivity;
/**
* 该峰处的探测效率
*/
@TableField(value = "EFFIC")
private Double effic;
/**
* 该峰处的探测效率不确定度
*/
@TableField(value = "UNEFFIC")
private Double unEffic;
/**
* 利用该峰计算得到的最小可探测活度
*/
@TableField(value = "MDA")
private Double mda;
/**
* 主射线标识01
*/
@TableField(value = "KEY_FLAG")
private Double keyFlag;
/**
* 符合相加校正因子无设为1
*/
@TableField(value = "CSC_RATIO")
private Double cscRatio;
/**
* 符合相加校正因子不确定度无设为0
*/
@TableField(value = "CSC_RATIO_ERR")
private Double cscRatioErr;
/**
* 活度是否经过符合相加校正
*/
@TableField(value = "CSC_MOD_FLAG")
private Double cscModFlag;
@TableField(value = "NUCLIDEFULLNAME")
private String nuclidefullname;
@TableField(value = "MDC")
private String mdc;
@TableField(value = "CONCENTRATION")
private String concentration;
}

View File

@ -0,0 +1,166 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 存储gamma谱的寻峰结果
*/
@Data
@TableName("RNMAN.GARDS_PEAKS_ROI")
public class GardsPeaksRoi implements Serializable {
/**
* 样品id
*/
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
/**
* 峰序号
*/
@TableField(value = "IDPEAK")
private Integer idPeak;
/**
* 分析ID号
*/
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
@TableField(value = "MODDATE")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
/**
* 峰中心道道址
*/
@TableField(value = "CENTROIDCHANNEL")
private Double centroidChannel;
/**
* 峰中心道不确定度道址
*/
@TableField(value = "UNCCENTROIDCHANNEL")
private Double uncCentroidChannel;
/**
* 峰中心道能量keV
*/
@TableField(value = "ENERGY")
private Double energy;
/**
* 峰中心道能量不确定度keV
*/
@TableField(value = "UNCENERGY")
private Double uncEnergy;
/**
* 峰面积计数已扣除基线面积但未扣除空白样品计数和探测器本底计数
*/
@TableField(value = "AREA")
private Double area;
/**
* 峰面积不确定度计数
*/
@TableField(value = "UNCAREA")
private Double uncArea;
/**
* 峰的净计数率1/s=峰面积/活时间
*/
@TableField(value = "NETCOUNTRATE")
private Double netCountRate;
/**
* 峰的净计数率的不确定度1/s
*/
@TableField(value = "UNCNETCOUNTRATE")
private Double uncNetCountRate;
/**
* 测量系统在峰能量处的绝对效率
*/
@TableField(value = "EFFICIENCY")
private Double efficiency;
/**
* 测量系统在峰能量处的绝对效率的不确定度
*/
@TableField(value = "UNCEFFICIENCY")
private Double uncefficiency;
/**
* 峰的半高宽
*/
@TableField(value = "FWHM")
private Double fwhm;
/**
* 峰的十分之一高宽
*/
@TableField(value = "FWTM")
private Double fwtm;
/**
* 峰的重要性因子
*/
@TableField(value = "SIGNIFICANCE")
private Double significance;
/**
* 峰的可探测线Lc
*/
@TableField(value = "LC")
private Double lc;
/**
* 峰的感兴趣区的起始道
*/
@TableField(value = "ROISTART")
private Double roiStart;
/**
* 峰的感兴趣区的结束道
*/
@TableField(value = "ROIEND")
private Double roiEnd;
@TableField(value = "MULTIINDEX")
private Double mulitiIndex;
@TableField(value = "TAIL")
private Double tail;
@TableField(value = "TAILALPHA")
private Double tailAlpha;
@TableField(value = "UPPERTAIL")
private Double upperTail;
@TableField(value = "UPPERTAILALPHA")
private Double upperTailAlpha;
@TableField(value = "BWWIDTHCHAN")
private Double bwwidthchan;
@TableField(value = "RECOILDELTACHAN")
private Double recoildeltachan;
@TableField(value = "STEPRAIO")
private Double stepraio;
@TableField(value = "LD")
private Double ld;
@TableField(value = "SENSITIVITY")
private Double sensitivity;
@TableField(value = "BACKGROUNDAREA")
private Double backgroundarea;
@TableField(value = "MEANBACKCOUNT")
private Double meanbackcount;
@TableField(value = "RECOILBETACHAN")
private Double recoilbetachan;
@TableField(value = "PEAKCOMMENTS")
private String peakcomments;
}

View File

@ -0,0 +1,42 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName(value = "RNMAN.GARDS_QC_CHECK_ROI")
public class GardsQcCheckRoi implements Serializable {
@TableField(value = "SAMPLE_ID")
private Integer sampleId;
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
@TableField(value = "ROI_ID")
private Integer roiId;
@TableField(value = "QC_NAME")
private String qcName;
@TableField(value = "QC_VALUE")
private Double qcValue;
@TableField(value = "QC_STANDARD")
private String qcStandard;
@TableField(value = "QC_RESULT")
private Integer qcResult;
@TableField(value = "MODDATE")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date moddate;
}

View File

@ -1,43 +0,0 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("RNAMN.GARDS_SAMPLE_GRADING")
public class GardsSampleGrading {
/**
* 样品ID (对应 SAMPLE_ID)
*/
private Long sampleId;
/**
* 台站ID (对应 STATION_ID)
*/
private Long stationId;
/**
* 分级结果 (对应 GRADING)
* 存储分级结果 "1", "2", "3"
*/
private String grading;
/**
* 分级状态 (对应 GRADING_STATUS)
* 0: 未处理
* 1: 已处理
* -1: 处理失败
*/
private Integer gradingStatus;
/**
* 样品类型 (对应 SAMPLE_TYPE)
* P: 颗粒样品
* B: 惰性气体样品
*/
private String sampleType;
}

View File

@ -1,30 +0,0 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@TableName("RNMAN.GARDS_THRESHOLD_RESULT")
public class GardsThresholdResult {
@TableId(type = IdType.ASSIGN_ID)
private String id;
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
private Integer stationId;
@TableField("NUCLIDENAME")
private String nuclideName;
private Double thresholdValue;
private Double median;
private Double percentile25;
private Double percentile75;
@TableField(exist = false)
private Date calculationTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date collectStop;
}

View File

@ -1,28 +0,0 @@
package org.jeecg.modules.base.entity.rnman;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName("RNMAN.GARDS_THRESHOLD_RESULT_HIS")
public class GardsThresholdResultHistory {
@TableId(type = IdType.ASSIGN_ID)
private String id;
@TableField(value = "IDANALYSIS")
private Integer idAnalysis;
private Integer stationId;
@TableField("NUCLIDENAME")
private String nuclideName;
private Double thresholdValue;
private Double median;
private Double percentile25;
private Double percentile75;
@TableField(exist = false)
private Date calculationTime;
}

View File

@ -61,10 +61,4 @@ public class GardsXeResults implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date moddate;
/**
* 算法分析标记
*/
@TableField(value = "ROI_PEAKFIT")
private String roiOrPeakFit;
}

View File

@ -7,22 +7,7 @@ import lombok.Getter;
@Getter
@AllArgsConstructor
public enum Condition {
/**
* 首次发现核素
*/
FIRST_FOUND("1"),
/**
* 核素conc超过平均值
*/
ABOVE_AVERAGE("2"),
/**
* 同时识别到多个核素
*/
MEANWHILE("3"),
/**
* 识别到某个核素
*/
IDENTIFY_NUCLIDES("4");
FIRST_FOUND("1"), ABOVE_AVERAGE("2"), MEANWHILE("3");
private final String value;

View File

@ -25,8 +25,6 @@ public enum DataType {
* 警告谱
*/
ALERT_FLOW("ALERT_FLOW",".alt"),
ALERT_PRESSURE("ALERT_PRESSURE",".alt"),
/**
* 健康状态谱
*/
@ -56,11 +54,7 @@ public enum DataType {
GPS("RMSGPS", ".gps"),
RESULT("HRULT", ".result"),
/**
* 溴化镧谱
*/
DOS("RMSDOS", ".dos");
RESULT("HRULT", ".result");
private String type;

View File

@ -7,13 +7,12 @@ import lombok.Getter;
@Getter
@AllArgsConstructor
public enum Item {
EMAIL_CONN("1", "Email Connection Status"),
TABLESPACE_USAGE("2", "TableSpace Usage"),
EMAIL_UNPROCESSED("3", "Email Unprocessed");
EMAIL_CONN("1", "Connection Status"),
TABLESPACE_USAGE("2", "TableSpace Usage");
private final String value;
private String value;
private final String name;
private String name;
public static Item of(String value){
for (Item item : Item.values()) {

View File

@ -4,37 +4,36 @@ import org.apache.commons.lang3.StringUtils;
public enum SampleFileHeader {
HEADER(0, "#Header"),
COMMENT(1, "#Comment"),
COLLECTION(2, "#Collection"),
ACQUISITION(3, "#Acquisition"),
PROCESSING(4, "#Processing"),
SAMPLE(5, "#Sample"),
GENERGY(6, "#g_Energy"),
BENERGY(7, "#b_Energy"),
GRESOLUTION(8, "#g_Resolution"),
BRESOLUTION(9, "#b_Resolution"),
GEFFICIENCY(10, "#g_Efficiency"),
HEADER(0,"#Header"),
COMMENT(1,"#Comment"),
COLLECTION(2,"#Collection"),
ACQUISITION(3,"#Acquisition"),
PROCESSING(4,"#Processing"),
SAMPLE(5,"#Sample"),
GENERGY(6,"#g_Energy"),
BENERGY(7,"#b_Energy"),
GRESOLUTION(8,"#g_Resolution"),
BRESOLUTION(9,"#b_Resolution"),
GEFFICIENCY(10,"#g_Efficiency"),
BEFFICIENCY(23,"#b_Efficiency"), // 20240801 自建台站增加
ROILIMITS(11, "#ROI_Limits"),
BGEFFICIENCY(12, "#b-gEfficiency"),
TOTALEFF(13, "#TotalEff"),
RATIOS(14, "#Ratios"),
GSPECTRUM(15, "#g_Spectrum"),
BSPECTRUM(16, "#b_Spectrum"),
HISTOGRAM(17, "#Histogram"),
CALIBRATION(18, "#Calibration"),
CERTIFICATE(19, "#Certificate"),
STOP(20, "STOP"),
BEGIN(21, "BEGIN"),
SPECTRUM(22, "#Spectrum"),
SELF_ATTENUATION(23,"#b_self_Attenuation");
ROILIMITS(11,"#ROI_Limits"),
BGEFFICIENCY(12,"#b-gEfficiency"),
TOTALEFF(13,"#TotalEff"),
RATIOS(14,"#Ratios"),
GSPECTRUM(15,"#g_Spectrum"),
BSPECTRUM(16,"#b_Spectrum"),
HISTOGRAM(17,"#Histogram"),
CALIBRATION(18,"#Calibration"),
CERTIFICATE(19,"#Certificate"),
STOP(20,"STOP"),
BEGIN(21,"BEGIN"),
SPECTRUM(22,"#Spectrum");
private Integer code;
private String message;
SampleFileHeader(Integer code, String message) {
SampleFileHeader(Integer code, String message){
this.code = code;
this.message = message;
}
@ -48,10 +47,10 @@ public enum SampleFileHeader {
return this.code;
}
public static Integer getCodeByMessage(String message) {
if (StringUtils.isNotBlank(message)) {
for (SampleFileHeader sampleFileHeader : values()) {
if (sampleFileHeader.getMessage().equals(message)) {
public static Integer getCodeByMessage(String message){
if (StringUtils.isNotBlank(message)){
for (SampleFileHeader sampleFileHeader:values()) {
if (sampleFileHeader.getMessage().equals(message)){
return sampleFileHeader.getCode();
}
}
@ -59,12 +58,12 @@ public enum SampleFileHeader {
return null;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
public static String getMessageByCode(Integer code){
if (code == null){
return StringUtils.EMPTY;
}
for (SampleFileHeader sampleFileHeader : values()) {
if (sampleFileHeader.getCode().equals(code)) {
for (SampleFileHeader sampleFileHeader:values()) {
if (sampleFileHeader.getCode().equals(code)){
return sampleFileHeader.getMessage();
}
}

View File

@ -2,7 +2,6 @@ package org.jeecg.modules.base.enums;
import cn.hutool.core.util.StrUtil;
import lombok.Getter;
/**
* 资源类型
@ -10,19 +9,22 @@ import lombok.Getter;
* @author nieziyan
* @date 2023-06-30
*/
@Getter
public enum SourceType {
EMAIL("Email"),
DATABASE("Database"),
SERVER("Server");
private final String type;
private String type;
SourceType(String type) {
this.type = type;
}
public String getType() {
return type;
}
public static SourceType typeOf(String type){
for (SourceType sourceType : SourceType.values()) {
if (StrUtil.equals(sourceType.getType(),type))

View File

@ -3,12 +3,7 @@ package org.jeecg.modules.base.enums;
* 谱类型
* */
public enum SpectrumType {
BETA("Beta"),
GAMMA("Gamma"),
SAMPLE("sample"),
GAS("gas"),
QC("qc"),
DET("det");
BETA("Beta"), GAMMA("Gamma");
SpectrumType(String type) {
this.type = type;

View File

@ -1,13 +0,0 @@
package org.jeecg.modules.base.enums;
public enum StationDetailType {
SAUNA,
SAUNA2,
SPALAX,
SPALAX_PLC,
Car,
LAB,
CINDER,
RASA,
ARIX_2
}

View File

@ -1,23 +0,0 @@
package org.jeecg.modules.base.enums;
public enum TransportTaskCloseStatusEnum {
/**
* 未关闭
*/
NOT_CLOSED(0),
/**
* 已关闭
*/
CLOSE(1);
private Integer value;
TransportTaskCloseStatusEnum(Integer value) {
this.value = value;
}
public Integer getValue(){
return this.value;
}
}

View File

@ -1,35 +0,0 @@
package org.jeecg.modules.base.enums;
public enum TransportTaskStatusEnum {
/**
* 执行失败
*/
FAILURE(-1),
/**
* 未开始
*/
NOT_STARTED(0),
/**
* 执行中
*/
IN_OPERATION(1),
/**
* 已完成
*/
COMPLETED(2),
/**
* 缺少气象数据
*/
LACK_MET_DATA(3);
private Integer value;
TransportTaskStatusEnum(Integer value) {
this.value = value;
}
public Integer getValue(){
return this.value;
}
}

View File

@ -1,12 +0,0 @@
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.jeecg.modules.base.entity.rnauto.GardsThresholdResultHistory;
@Mapper
public interface RnAutoThresholdResultHisMapper extends BaseMapper<GardsThresholdResultHistory> {
}

View File

@ -1,9 +0,0 @@
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.jeecg.modules.base.entity.rnman.GardsThresholdResultHistory;
@Mapper
public interface RnManThresholdResultHisMapper extends BaseMapper<GardsThresholdResultHistory> {
}

View File

@ -1,24 +0,0 @@
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.base.entity.ThresholdMetric;
import org.jeecg.modules.base.entity.rnauto.GardsThresholdResult;
import java.sql.Timestamp;
import java.util.List;
@Mapper
public interface ThresholdRnAutoResultMapper extends BaseMapper<GardsThresholdResult> {
List<GardsThresholdResult> selectByStationId(String stationId);
void deleteByStationId(String stationId);
int batchInsert(List<GardsThresholdResult> subList);
List<ThresholdMetric> selectByRnAutoStationIds(@Param("stationIds") List<String> stationIds,
@Param("oneYearAgo")
Timestamp oneYearAgo);
}

View File

@ -1,23 +0,0 @@
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.base.entity.ThresholdMetric;
import org.jeecg.modules.base.entity.rnman.GardsThresholdResult;
import java.sql.Timestamp;
import java.util.List;
@Mapper
public interface ThresholdRnManResultMapper extends BaseMapper<GardsThresholdResult> {
int batchInsertRnMan(@Param("list") List<GardsThresholdResult> results);
void deleteByStationId(String stationId);
List<GardsThresholdResult> selectByStationId(String stationId);
List<ThresholdMetric> selectByRnManStationIds(@Param("stationIds") List<String> stationIds,
@Param("oneYearAgo") Timestamp oneYearAgo);
}

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