添加能谱分析耗时计算
This commit is contained in:
parent
88be0c9bb3
commit
d3481b1b0e
|
@ -1,7 +1,9 @@
|
|||
package org.jeecg.modules.spectrum;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.StopWatch;
|
||||
import org.jeecg.common.constant.StringConstant;
|
||||
import org.jeecg.common.properties.SpectrumPathProperties;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
|
@ -25,6 +27,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* 警告谱处理
|
||||
*/
|
||||
@Slf4j
|
||||
public class AlertSpectrum extends AbstractSpectrumHandler{
|
||||
|
||||
/**
|
||||
|
@ -76,6 +79,8 @@ public class AlertSpectrum extends AbstractSpectrumHandler{
|
|||
DataType.ALERT_SYSTEM.getType().equals(super.currDataType.getType()) ||
|
||||
DataType.ALERT_UPS.getType().equals(super.currDataType.getType())){
|
||||
try{
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
//打印当前处理的能谱类型
|
||||
super.printCurrDataType();
|
||||
//解析邮件内容
|
||||
|
@ -86,6 +91,8 @@ public class AlertSpectrum extends AbstractSpectrumHandler{
|
|||
super.saveFileToSavefile();
|
||||
//结构体数据入库
|
||||
this.handlerOriginalData();
|
||||
stopWatch.stop();
|
||||
log.info("{}处理耗时为:{}毫秒",spectrumFile.getName(),stopWatch.getTime());
|
||||
//若本次文件来自于undel目录,解析成功则删除
|
||||
deleteIfFromUndelFile();
|
||||
}catch (Exception e){
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.jeecg.modules.spectrum;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.time.StopWatch;
|
||||
import org.jeecg.modules.base.enums.DataType;
|
||||
import org.jeecg.modules.base.enums.SampleStatus;
|
||||
import java.util.Objects;
|
||||
|
@ -7,6 +9,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* 探测器本地谱处理
|
||||
*/
|
||||
@Slf4j
|
||||
public class DetbkphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
||||
|
||||
/**
|
||||
|
@ -29,6 +32,8 @@ public class DetbkphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
public void handler() throws Exception {
|
||||
if(DataType.DETBKPHD.getType().equals(super.currDataType.getType())){
|
||||
try{
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
//前置检查
|
||||
this.preCheck();
|
||||
//声明日志处理对象
|
||||
|
@ -45,6 +50,8 @@ public class DetbkphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
super.saveFileToSavefile();
|
||||
//结构体数据入库
|
||||
super.handlerOriginalData();
|
||||
stopWatch.stop();
|
||||
log.info("{}处理耗时为:{}毫秒",spectrumFile.getName(),stopWatch.getTime());
|
||||
//修改状态为解析完成
|
||||
super.status = SampleStatus.COMPLETE.getValue();
|
||||
super.updateStatus();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.jeecg.modules.spectrum;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.time.StopWatch;
|
||||
import org.jeecg.modules.base.enums.DataType;
|
||||
import org.jeecg.modules.base.enums.SampleStatus;
|
||||
import java.util.Objects;
|
||||
|
@ -31,6 +32,8 @@ public class GasbkphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
public void handler() throws Exception {
|
||||
if(DataType.GASBKPHD.getType().equals(super.currDataType.getType())){
|
||||
try{
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
//前置检查
|
||||
this.preCheck();
|
||||
//声明日志处理对象
|
||||
|
@ -47,6 +50,8 @@ public class GasbkphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
super.saveFileToSavefile();
|
||||
//结构体数据入库
|
||||
super.handlerOriginalData();
|
||||
stopWatch.stop();
|
||||
log.info("{}处理耗时为:{}毫秒",spectrumFile.getName(),stopWatch.getTime());
|
||||
//修改状态为解析完成
|
||||
super.status = SampleStatus.COMPLETE.getValue();
|
||||
super.updateStatus();
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package org.jeecg.modules.spectrum;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.StopWatch;
|
||||
import org.jeecg.common.constant.StringConstant;
|
||||
import org.jeecg.common.properties.SpectrumPathProperties;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
|
@ -26,6 +28,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* 健康状态谱处理
|
||||
*/
|
||||
@Slf4j
|
||||
public class HealthStatusSpectrum extends AbstractSpectrumHandler{
|
||||
|
||||
/**
|
||||
|
@ -73,6 +76,8 @@ public class HealthStatusSpectrum extends AbstractSpectrumHandler{
|
|||
public void handler() throws Exception {
|
||||
if(DataType.SOH.getType().equals(super.currDataType.getType())){
|
||||
try {
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
//前置检查
|
||||
this.preCheck();
|
||||
//打印当前处理的能谱类型
|
||||
|
@ -85,6 +90,8 @@ public class HealthStatusSpectrum extends AbstractSpectrumHandler{
|
|||
super.saveFileToSavefile();
|
||||
//结构体数据入库
|
||||
this.handlerOriginalData();
|
||||
stopWatch.stop();
|
||||
log.info("{}处理耗时为:{}毫秒",spectrumFile.getName(),stopWatch.getTime());
|
||||
//把流程日志保存到日志目录
|
||||
this.saveLogToLogDir();
|
||||
//若本次文件来自于undel目录,解析成功则删除
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package org.jeecg.modules.spectrum;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.StopWatch;
|
||||
import org.jeecg.common.constant.StringConstant;
|
||||
import org.jeecg.common.properties.SpectrumPathProperties;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
|
@ -21,6 +23,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* 气象谱处理
|
||||
*/
|
||||
@Slf4j
|
||||
public class MetSpectrum extends AbstractSpectrumHandler{
|
||||
|
||||
/**
|
||||
|
@ -66,6 +69,8 @@ public class MetSpectrum extends AbstractSpectrumHandler{
|
|||
public void handler() throws Exception {
|
||||
if(DataType.MET.getType().equals(super.currDataType.getType())){
|
||||
try {
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
//打印当前处理的能谱类型
|
||||
super.printCurrDataType();
|
||||
//解析邮件内容
|
||||
|
@ -76,6 +81,8 @@ public class MetSpectrum extends AbstractSpectrumHandler{
|
|||
super.saveFileToSavefile();
|
||||
//结构体数据入库
|
||||
this.handlerOriginalData();
|
||||
stopWatch.stop();
|
||||
log.info("{}处理耗时为:{}毫秒",spectrumFile.getName(),stopWatch.getTime());
|
||||
//把流程日志保存到日志目录
|
||||
this.saveLogToLogDir();
|
||||
//若本次文件来自于undel目录,解析成功则删除
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.jeecg.modules.spectrum;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.time.StopWatch;
|
||||
import org.jeecg.modules.base.enums.DataType;
|
||||
import org.jeecg.modules.base.enums.SampleStatus;
|
||||
import java.util.Objects;
|
||||
|
@ -7,6 +9,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* QC谱处理
|
||||
*/
|
||||
@Slf4j
|
||||
public class QcphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
||||
|
||||
/**
|
||||
|
@ -30,6 +33,8 @@ public class QcphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
//判断当前邮件内容是否是QC谱
|
||||
if(DataType.QCPHD.getType().equals(super.currDataType.getType())){
|
||||
try{
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
//前置检查
|
||||
this.preCheck();
|
||||
//声明日志处理对象
|
||||
|
@ -46,6 +51,8 @@ public class QcphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
super.saveFileToSavefile();
|
||||
//结构体数据入库
|
||||
super.handlerOriginalData();
|
||||
stopWatch.stop();
|
||||
log.info("{}处理耗时为:{}毫秒",spectrumFile.getName(),stopWatch.getTime());
|
||||
//修改状态为解析完成
|
||||
super.status = SampleStatus.COMPLETE.getValue();
|
||||
super.updateStatus();
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.jeecg.modules.spectrum;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.time.StopWatch;
|
||||
import org.jeecg.modules.ErrorLogManager;
|
||||
import org.jeecg.modules.base.enums.DataType;
|
||||
import org.jeecg.modules.base.enums.SampleStatus;
|
||||
|
@ -19,6 +21,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* 样品谱处理
|
||||
*/
|
||||
@Slf4j
|
||||
public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
||||
|
||||
/**
|
||||
|
@ -41,6 +44,8 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
public void handler() throws Exception {
|
||||
if(DataType.SAMPLEPHD.getType().equals(super.currDataType.getType())){
|
||||
try{
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
//前置检查
|
||||
this.preCheck();
|
||||
//声明日志处理对象
|
||||
|
@ -60,6 +65,8 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
}
|
||||
//结构体数据入库
|
||||
super.handlerOriginalData();
|
||||
stopWatch.stop();
|
||||
log.info("{}处理耗时为:{}毫秒",spectrumFile.getName(),stopWatch.getTime());
|
||||
//进行B、G(P)谱分析
|
||||
this.autoAnalysis();
|
||||
//保存PHD文件到savefile
|
||||
|
|
Loading…
Reference in New Issue
Block a user