Compare commits
184 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5719c210ca | ||
|
|
356bd94a26 | ||
|
|
af71f40b1c | ||
|
|
0718701788 | ||
|
|
2693294331 | ||
|
|
6d2ec53b4c | ||
|
|
c0ba24aae4 | ||
|
|
a2e48e5b84 | ||
|
|
8aeebe3047 | ||
|
|
56e7c6adc5 | ||
|
|
02083f93f5 | ||
|
|
e266148da1 | ||
|
|
cd3d19db70 | ||
|
|
9a7cdbe1ed | ||
|
|
979f24a10c | ||
|
|
4ddf2f2b46 | ||
|
|
f214f9fc97 | ||
|
|
b7ae380fb1 | ||
|
|
219b644669 | ||
|
|
aef513794b | ||
|
|
bead8100e7 | ||
|
|
69e668a9a7 | ||
|
|
441a4ee6f6 | ||
|
|
8cac8a6099 | ||
|
|
0aeb76d959 | ||
|
|
ba17537b44 | ||
|
|
135f4ebd21 | ||
|
|
dc3375a5ab | ||
|
|
6f9e33e48b | ||
|
|
ddbb632492 | ||
|
|
164e44d086 | ||
|
|
b48cf5a991 | ||
|
|
19c9bae348 | ||
|
|
40e94299a7 | ||
|
|
b19f5087ed | ||
|
|
6bb4cb67a1 | ||
|
|
c6ea38f2d3 | ||
|
|
7c5ffb4cf2 | ||
|
|
f905f9951d | ||
|
|
bc74b2e32e | ||
|
|
48fc1b30e5 | ||
|
|
01ea4f8c63 | ||
|
|
cf369218da | ||
|
|
0cd2e0f29c | ||
|
|
c83aff08bd | ||
|
|
da269b1da1 | ||
|
|
9726c51710 | ||
|
|
71411c8d4c | ||
|
|
511afb8677 | ||
|
|
50c70d7026 | ||
|
|
82ebe1009e | ||
|
|
2e0814fa14 | ||
|
|
e11eee19f7 | ||
|
|
566657c339 | ||
|
|
2e08948302 | ||
|
|
79063e235a | ||
|
|
d64a0be200 | ||
|
|
9f7295673d | ||
|
|
aa99d7214b | ||
|
|
73286710e0 | ||
|
|
1f94e14a70 | ||
|
|
48a03b6d6f | ||
|
|
f4aef9bdee | ||
|
|
970d4f3027 | ||
|
|
8869735270 | ||
|
|
dee89d28b5 | ||
|
|
1e830b0392 | ||
|
|
61ecc0ea5c | ||
|
|
95116338ad | ||
|
|
755f36d012 | ||
|
|
0af17e0601 | ||
|
|
7cd16a77c2 | ||
|
|
7daebd98b8 | ||
|
|
567b64a34e | ||
|
|
793d767313 | ||
|
|
cb74fb5a9e | ||
|
|
2a6a38c286 | ||
|
|
108f2db587 | ||
|
|
90ecbfe99b | ||
|
|
55b14e66b6 | ||
|
|
fa79e380dd | ||
|
|
f2d211b2b2 | ||
|
|
5849612a3b | ||
|
|
3d97ffb539 | ||
|
|
b5d4b23f3c | ||
|
|
3c02c89ae5 | ||
|
|
16a1407216 | ||
|
|
143e1b1092 | ||
|
|
5b94121112 | ||
|
|
5c0f09c616 | ||
|
|
03d92b7889 | ||
|
|
9bbdd5eb5d | ||
|
|
277485ddda | ||
|
|
2e10465bfe | ||
|
|
5a8f20362a | ||
|
|
c64079e1f1 | ||
|
|
f4b05e2da1 | ||
|
|
3f22b0edba | ||
|
|
ebdf8d863a | ||
|
|
80985a74d7 | ||
|
|
0a560452bf | ||
|
|
f6b963145f | ||
|
|
8b40646076 | ||
|
|
cf0751109d | ||
|
|
64a98bd4ea | ||
|
|
f1410028fa | ||
|
|
d5dce1c3fc | ||
|
|
e83c1d6199 | ||
|
|
86968e383b | ||
|
|
9fffd2436c | ||
|
|
2407b65a06 | ||
|
|
6c5a0bf546 | ||
|
|
caf47a58d5 | ||
|
|
600c5235ec | ||
|
|
3a1567f853 | ||
|
|
18b495d1d0 | ||
|
|
6335a3f588 | ||
|
|
d5b18e57b5 | ||
|
|
14e64306b2 | ||
|
|
0c8019ad15 | ||
|
|
d92d55befc | ||
|
|
fc4623e584 | ||
|
|
8d3b380837 | ||
|
|
eedcd67113 | ||
|
|
4c16d4527d | ||
|
|
2d840bcd8b | ||
|
|
5c181d60b1 | ||
|
|
bde5eed237 | ||
|
|
1c34f3dde1 | ||
|
|
8b9882842f | ||
|
|
19b0366ace | ||
|
|
b6bad77274 | ||
|
|
c892a339e0 | ||
|
|
9e8935c9d4 | ||
|
|
9107cdf13e | ||
|
|
01eb8d22c2 | ||
|
|
412d7e74d9 | ||
|
|
6a65d9cdd6 | ||
|
|
7af7fafc86 | ||
|
|
dac0736e72 | ||
|
|
c62b55913a | ||
|
|
071e9690c6 | ||
|
|
a730178204 | ||
|
|
cf2fe9dd8e | ||
|
|
39348f16f3 | ||
|
|
8c5f85b499 | ||
|
|
e3e8a52344 | ||
|
|
a2ff824fc7 | ||
|
|
1aa68d4974 | ||
|
|
a6deb7c53f | ||
|
|
229d1980dd | ||
|
|
f7677e56e2 | ||
|
|
35ac1ebf0c | ||
|
|
5498e0e433 | ||
|
|
cc3c056bcf | ||
|
|
630bc4ee4f | ||
|
|
d611bf1ff1 | ||
|
|
49dee87eed | ||
|
|
d8e980fdb2 | ||
|
|
680c263033 | ||
|
|
90684089a1 | ||
|
|
df15a907e9 | ||
|
|
2f1f658d33 | ||
|
|
b7c0553239 | ||
|
|
0d4deaf403 | ||
|
|
e159740d76 | ||
|
|
82713a8795 | ||
|
|
ee2dd272d1 | ||
|
|
9f8e79226e | ||
|
|
1452be8f31 | ||
|
|
e33fc8df83 | ||
|
|
d1de32433e | ||
|
|
eb3605d9e8 | ||
|
|
55f9cd49e1 | ||
|
|
76acc20a7d | ||
|
|
84d6c4a5a2 | ||
|
|
16f59f0273 | ||
|
|
63576edde8 | ||
|
|
03955c3691 | ||
|
|
8faa97d8f1 | ||
|
|
3c4aae44e0 | ||
|
|
ee3a04af2f | ||
|
|
941c6c0685 | ||
|
|
cadbdb3ba9 |
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
@ -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组成,例如name,version,vendor,support-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组成,例如name,version,vendor,support-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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -74,11 +74,6 @@ public class SpectrumPathProperties implements Serializable {
|
|||
*/
|
||||
private String errorFilePath;
|
||||
|
||||
/**
|
||||
* dos谱外放目录(西安那边从外放目录拿取dos谱)
|
||||
*/
|
||||
private String dosExternalDirectory;
|
||||
|
||||
/**
|
||||
* 能谱文件存储路径以能谱系统类型/能谱类型为key,以存储路径为value
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 日期转换为字符串
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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="";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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){
|
||||
// 返回批处理的执行结果
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class ShiroConfig {
|
|||
|
||||
/**
|
||||
* Filter Chain定义说明
|
||||
* <p>
|
||||
*
|
||||
* 1、一个URL可以配置多个Filter,使用逗号分隔
|
||||
* 2、当设置多个过滤器时,全部验证通过,才视为通过
|
||||
* 3、部分过滤器可指定参数,如perms,roles
|
||||
|
|
@ -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");
|
||||
|
||||
|
||||
//性能监控——安全隐患泄露TOEKN(durid连接池也有)
|
||||
//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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ public class DatabaseDto implements Serializable {
|
|||
|
||||
private String name;
|
||||
|
||||
private String instance;
|
||||
|
||||
private String url;
|
||||
|
||||
private String type;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,4 @@ public class EmailDto implements Serializable {
|
|||
private String username; // 邮箱用户名
|
||||
|
||||
private Integer isQiye; // 是否企业邮箱
|
||||
|
||||
private Integer emailServerType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package org.jeecg.modules.base.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoiDto {
|
||||
|
||||
private Integer roiNum;
|
||||
|
||||
private String phdPath;
|
||||
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
package org.jeecg.modules.base.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SampNucl {
|
||||
|
||||
private String sampleId;
|
||||
|
||||
private String nuclideName;
|
||||
}
|
||||
|
|
@ -14,9 +14,4 @@ public class SourceDto implements Serializable {
|
|||
private String hostId;
|
||||
|
||||
private String cpuUsedItemId;
|
||||
|
||||
/**
|
||||
* 是否启用邮箱(0-不启用,1-启用)
|
||||
*/
|
||||
private Integer enabled;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;// 浓度列表
|
||||
}
|
||||
|
|
@ -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;// 浓度列表
|
||||
}
|
||||
|
|
@ -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(); }
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ public class GardsCalibration implements Serializable {
|
|||
/**
|
||||
* 拟合方程ID号(统一定义)
|
||||
*/
|
||||
@TableField(value = "\"function\"")
|
||||
@TableField(value = "FUNCTION")
|
||||
private Integer function;
|
||||
/**
|
||||
* 拟合方程描述
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* G:gamma探测器的数据,#g_;B:beta探测器的数据,#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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* G:gamma探测器的数据,#g_;B:beta探测器的数据,#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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
/**
|
||||
* 主射线标识:0-否;1-是
|
||||
*/
|
||||
@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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ public class GardsCalibration implements Serializable {
|
|||
/**
|
||||
* 拟合方程ID号(统一定义)
|
||||
*/
|
||||
@TableField(value = "\"function\"")
|
||||
@TableField(value = "FUNCTION")
|
||||
private Integer function;
|
||||
/**
|
||||
* 拟合方程描述
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* G:gamma探测器的数据,#g_;B:beta探测器的数据,#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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* G:gamma探测器的数据,#g_;B:beta探测器的数据,#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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
/**
|
||||
* 主射线标识:0-否;1-是
|
||||
*/
|
||||
@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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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()) {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
package org.jeecg.modules.base.enums;
|
||||
|
||||
public enum StationDetailType {
|
||||
SAUNA,
|
||||
SAUNA2,
|
||||
SPALAX,
|
||||
SPALAX_PLC,
|
||||
Car,
|
||||
LAB,
|
||||
CINDER,
|
||||
RASA,
|
||||
ARIX_2
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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> {
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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
Loading…
Reference in New Issue
Block a user