修改台站计算有效率,parameter.xml新加SAUNA2、SPALAX-PLC节点

This commit is contained in:
duwenyuan 2025-04-30 17:38:57 +08:00
parent 995c67b603
commit 1c4b4af39c
12 changed files with 2161 additions and 1002 deletions

View File

@ -100,5 +100,9 @@ public class GardsStations implements Serializable {
@TableField(value = "CATEGORY")
private Integer category;
/**
* 有效率计算类型
*/
@TableField(value = "EFFIC_CALCUL_TYPE")
private String efficCalculType;
}

View File

@ -74,6 +74,7 @@ public class DataProvisionEfficiencyManager {
stationInfo.setType(gardsStations.getType());
stationInfo.setDescription(gardsStations.getDescription());
stationInfo.setStatus(gardsStations.getStatus());
stationInfo.setEfficCalculType(gardsStations.getEfficCalculType());
boolean contains = detectorsUsedList.contains(gardsStations.getStationId());
if (contains) {
stationInfo.setUsed("YES");

View File

@ -16,7 +16,7 @@ import java.util.Objects;
import java.util.concurrent.CountDownLatch;
@Slf4j
public class CalculateDataRateThread implements Runnable{
public class CalculateDataRateThread implements Runnable {
private ICalCulStationDataService calCulStationDataService = ApplicationContextUtil.getContext().getBean(ICalCulStationDataService.class);
@ -36,7 +36,7 @@ public class CalculateDataRateThread implements Runnable{
public void run() {
try {
this.calCulStationInfo();
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
} finally {
// CountDownLatch 计数器减 1
@ -47,9 +47,9 @@ public class CalculateDataRateThread implements Runnable{
/**
* 计算台站信息
*/
public void calCulStationInfo(){
public void calCulStationInfo() {
//判断当前台站及数据相关信息是否为空
if(Objects.isNull(stationinfoAndDataRate)) {
if (Objects.isNull(stationinfoAndDataRate)) {
return;
}
//获取台站信息
@ -68,16 +68,17 @@ public class CalculateDataRateThread implements Runnable{
calculateDataRate.setMStationId(stationInfo.getId());
calculateDataRate.setMStationCode(stationInfo.getStationCode());
calculateDataRate.setMStationType(stationInfo.getType());
calculateDataRate.setMEfficCalculType(stationInfo.getEfficCalculType());
//计算台站数据
Rate calculate = this.calculate(calculateDataRate);
stationInfo.setPhdf(calculate.getPhdfOffered()+"/"+calculate.getPhdfEfficient());
stationInfo.setPhd(calculate.getPhdOffered()+"/"+calculate.getPhdEfficient());
stationInfo.setPhdf(calculate.getPhdfOffered() + "/" + calculate.getPhdfEfficient());
stationInfo.setPhd(calculate.getPhdOffered() + "/" + calculate.getPhdEfficient());
stationInfo.setMet(String.valueOf(calculate.getMet()));
stationInfo.setSoh(String.valueOf(calculate.getSoh()));
stationInfo.setPhdMetSoh(String.valueOf(calculate.getPhdMetSoh()));
if(calculate.getPhdfEfficient() >= mRateparam.getParameter().getExcellent()) {
if (calculate.getPhdfEfficient() >= mRateparam.getParameter().getExcellent()) {
stationInfo.setQuality("excellent");
} else if(calculate.getPhdfEfficient() >= mRateparam.getParameter().getGood()) {
} else if (calculate.getPhdfEfficient() >= mRateparam.getParameter().getGood()) {
stationInfo.setQuality("good");
} else {
stationInfo.setQuality("bad");
@ -92,7 +93,7 @@ public class CalculateDataRateThread implements Runnable{
* 根据台站编码及台站类型选择不同的方法
* @param calculateDataRate
*/
public Rate calculate(CalculateDataRate calculateDataRate){
public Rate calculate(CalculateDataRate calculateDataRate) {
Rate mRate = new Rate();
if (StringUtils.isBlank(calculateDataRate.getMStationId())) {
log.error("台站id不能为空");
@ -101,21 +102,30 @@ public class CalculateDataRateThread implements Runnable{
String stationCode = calculateDataRate.getMStationCode();
//获取台站类型
String stationType = calculateDataRate.getMStationType();
//修改使用efficCalculType判断台站类型
String efficCalculType = calculateDataRate.getMEfficCalculType();
//判断台站编码及台站类型
if((StringUtils.isNotBlank(stationCode) && stationCode.substring(2,3).equals("X")) && (StringUtils.isNotBlank(stationType) && stationType.equals("SAUNA")) ) {
//切割台站编码 如果 第三个字符是 X 并且 台站类型是 SAUNA
if ((StringUtils.isNotBlank(stationCode) && stationCode.charAt(2) == 'X') && (StringUtils.isNotBlank(efficCalculType) && efficCalculType.equals("SAUNA"))) {
//切割台站编码 如果 第三个字符是 X 并且 EFFIC_CALCUL_TYPE类型是 SAUNA
mRate = saunacalc(calculateDataRate);
} else if((StringUtils.isNotBlank(stationCode) && stationCode.substring(2,3).equals("X")) && (StringUtils.isNotBlank(stationType) && stationType.equals("SPALAX")) ) {
//切割台站编码 如果 第三个字符是 X 并且 台站类型是 SPALAX
} else if ((StringUtils.isNotBlank(stationCode) && stationCode.charAt(2) == 'X') && (StringUtils.isNotBlank(efficCalculType) && efficCalculType.equals("SAUNA2"))) {
//切割台站编码 如果 第三个字符是 X 并且 EFFIC_CALCUL_TYPE类型是 SAUNA2
mRate = saunacalc2(calculateDataRate);
} else if ((StringUtils.isNotBlank(stationCode) && stationCode.charAt(2) == 'X') && (StringUtils.isNotBlank(efficCalculType) && efficCalculType.equals("SPALAX"))) {
//切割台站编码 如果 第三个字符是 X 并且 EFFIC_CALCUL_TYPE类型是 SPALAX
mRate = spalaxcalc(calculateDataRate);
} else if(StringUtils.isNotBlank(stationCode) && stationCode.substring(2,3).equals("P")) {
} else if ((StringUtils.isNotBlank(stationCode) && stationCode.charAt(2) == 'X') && (StringUtils.isNotBlank(efficCalculType) && efficCalculType.equals("SPALAX_PLC"))) {
//切割台站编码 如果 第三个字符是 X 并且 EFFIC_CALCUL_TYPE类型是 SPALAX-PLC
mRate = spalaxcalcPLC(calculateDataRate);
} else if (StringUtils.isNotBlank(stationCode) && stationCode.charAt(2) == 'P') {
//切割台站编码 如果 第三个字符是 P
mRate = particulatecalc(calculateDataRate);
}
return mRate;
}
public Rate saunacalc(CalculateDataRate calculateDataRate){
public Rate saunacalc(CalculateDataRate calculateDataRate) {
Rate mRate = new Rate();
//获取特殊台站相关集合
Map<String, Specialpara> mSpecialparam = calculateDataRate.getMSpecialparam();
@ -136,11 +146,11 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String number = param.getPhdf().getNumber();
phdfProvisionRate = calCulStationDataService.findPhdfProvisionRateSauna(curDateTime, pretime, number, stationId);
}else {
} else {
String number = calculateDataRate.getMParameter().getPhdfSauna().getNumber();
phdfProvisionRate = calCulStationDataService.findPhdfProvisionRateSauna(curDateTime, pretime, number, stationId);
}
if (Objects.nonNull(phdfProvisionRate)){
if (Objects.nonNull(phdfProvisionRate)) {
Double phdf_offered = phdfProvisionRate.getDataRate();
mRate.setPhdfOffered(phdf_offered);
}
@ -159,7 +169,7 @@ public class CalculateDataRateThread implements Runnable{
String liveQc = param.getPhdf().getLiveQc();
String number = param.getPhdf().getNumber();
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencySauna(liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, curDateTime, pretime, number, stationId);
}else {
} else {
String liveLow = calculateDataRate.getMParameter().getPhdfSauna().getLiveLow();
String liveHigh = calculateDataRate.getMParameter().getPhdfSauna().getLiveHigh();
String quantity = calculateDataRate.getMParameter().getPhdfSauna().getQuantity();
@ -170,9 +180,9 @@ public class CalculateDataRateThread implements Runnable{
String nuclideName = calculateDataRate.getMParameter().getPhdfSauna().getNuclideName();
String liveQc = calculateDataRate.getMParameter().getPhdfSauna().getLiveQc();
String number = calculateDataRate.getMParameter().getPhdfSauna().getNumber();
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencySauna(liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, curDateTime,pretime, number,stationId);
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencySauna(liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, curDateTime, pretime, number, stationId);
}
if (Objects.nonNull(phdfProvisionEfficiency)){
if (Objects.nonNull(phdfProvisionEfficiency)) {
Double phdf_efficient = phdfProvisionEfficiency.getDataEfficiency();
mRate.setPhdfEfficient(phdf_efficient);
}
@ -182,11 +192,11 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String number = param.getPhd().getNumber();
phdProvisionRate = calCulStationDataService.findPhdProvisionRateSauna(curDateTime, pretime, number, stationId);
}else {
} else {
String number = calculateDataRate.getMParameter().getPhdSauna().getNumber();
phdProvisionRate = calCulStationDataService.findPhdProvisionRateSauna(curDateTime, pretime, number, stationId);
}
if (Objects.nonNull(phdProvisionRate)){
if (Objects.nonNull(phdProvisionRate)) {
Double phd_offered = phdProvisionRate.getDataRate();
mRate.setPhdOffered(phd_offered);
}
@ -205,7 +215,7 @@ public class CalculateDataRateThread implements Runnable{
String liveQc = param.getPhd().getLiveQc();
String number = param.getPhd().getNumber();
phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencySauna(liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, curDateTime, pretime, number, stationId);
}else {
} else {
String liveLow = calculateDataRate.getMParameter().getPhdSauna().getLiveLow();
String liveHigh = calculateDataRate.getMParameter().getPhdSauna().getLiveHigh();
String quantity = calculateDataRate.getMParameter().getPhdSauna().getQuantity();
@ -216,9 +226,9 @@ public class CalculateDataRateThread implements Runnable{
String nuclideName = calculateDataRate.getMParameter().getPhdSauna().getNuclideName();
String liveQc = calculateDataRate.getMParameter().getPhdSauna().getLiveQc();
String number = calculateDataRate.getMParameter().getPhdSauna().getNumber();
phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencySauna(liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, curDateTime,pretime, number,stationId);
phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencySauna(liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, curDateTime, pretime, number, stationId);
}
if (Objects.nonNull(phdProvisionEfficiency)){
if (Objects.nonNull(phdProvisionEfficiency)) {
Double phd_efficient = phdProvisionEfficiency.getDataEfficiency();
mRate.setPhdEfficient(phd_efficient);
}
@ -228,11 +238,11 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String met = param.getMet();
metProvision = calCulStationDataService.findMetProvisionSauna(curDateTime, pretime, met, stationId);
}else {
} else {
String met = calculateDataRate.getMParameter().getMet();
metProvision = calCulStationDataService.findMetProvisionSauna(curDateTime, pretime, met, stationId);
}
if (Objects.nonNull(metProvision)){
if (Objects.nonNull(metProvision)) {
Double met = metProvision.getDataRate();
mRate.setMet(met);
}
@ -242,11 +252,11 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String soh = param.getSoh();
sohProvision = calCulStationDataService.findSohProvisionSauna(curDateTime, pretime, soh, stationId);
}else {
} else {
String soh = calculateDataRate.getMParameter().getSoh();
sohProvision = calCulStationDataService.findSohProvisionSauna(curDateTime, pretime, soh, stationId);
}
if (Objects.nonNull(sohProvision)){
if (Objects.nonNull(sohProvision)) {
Double soh = sohProvision.getDataRate();
mRate.setSoh(soh);
}
@ -268,18 +278,173 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String sphdMetSoh = param.getSphdMetSoh();
sphdMetSohProvision = calCulStationDataService.findSphdMetSohProvisionSauna(SPHD_NUM, MET_NUM, curDateTime, pretime, sphdMetSoh, stationId);
}else {
} else {
String sphdMetSoh = calculateDataRate.getMParameter().getSphdMetSoh().getSaunaEverydaynums();
sphdMetSohProvision = calCulStationDataService.findSphdMetSohProvisionSauna(SPHD_NUM, MET_NUM, curDateTime, pretime, sphdMetSoh, stationId);
}
if (Objects.nonNull(sphdMetSohProvision)){
if (Objects.nonNull(sphdMetSohProvision)) {
Double phd_met_soh = sphdMetSohProvision.getDataRate();
mRate.setPhdMetSoh(phd_met_soh);
}
return mRate;
}
public Rate spalaxcalc(CalculateDataRate calculateDataRate){
private Rate saunacalc2(CalculateDataRate calculateDataRate) {
Rate mRate = new Rate();
//region 局部变量
//获取特殊台站相关集合
Map<String, Specialpara> mSpecialparam = calculateDataRate.getMSpecialparam();
//根据台站名称获取对应的 参数信息
Specialpara param = mSpecialparam.get(calculateDataRate.getMStationCode());
//获取日期间隔
double dayspan = calculateDataRate.getMParameter().getDayspan();
//获取当前日期
LocalDateTime currentTime = LocalDateTime.now();
//当前日期转换成字符串格式
String curDateTime = currentTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
//当前日期减去对应的时间间隔 获取开始时间 并转换成字符串格式
String pretime = currentTime.minusDays((long) dayspan).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
//获取台站id
String stationId = calculateDataRate.getMStationId();
String liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, number;
//endregion
//判断当前台站编码是否属于特殊计算的台站 计算PHDF的数据提供率
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
number = param.getPhdf().getNumber();
} else {
number = calculateDataRate.getMParameter().getPhdfSauna2().getNumber();
}
ProvisionData phdfProvisionRate = calCulStationDataService.findPhdfProvisionRateSauna2(curDateTime, pretime, number, stationId);
if (Objects.nonNull(phdfProvisionRate)) {
double phdf_offered = phdfProvisionRate.getDataRate();
mRate.setPhdfOffered(phdf_offered);
}
//判断当前台站编码是否属于特殊计算的台站 计算PHDF的数据提供率
ProvisionData phdfProvisionEfficiency;
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
liveLow = param.getPhdf().getLiveLow();
liveHigh = param.getPhdf().getLiveHigh();
quantity = param.getPhdf().getQuantity();
mdc = param.getPhdf().getMdc();
collectLow = param.getPhdf().getCollectLow();
collectHigh = param.getPhdf().getCollectHigh();
xeVolume = param.getPhdf().getXeVolume();
nuclideName = param.getPhdf().getNuclideName();
liveQc = param.getPhdf().getLiveQc();
number = param.getPhdf().getNumber();
}
else {
liveLow = calculateDataRate.getMParameter().getPhdfSauna2().getLiveLow();
liveHigh = calculateDataRate.getMParameter().getPhdfSauna2().getLiveHigh();
quantity = calculateDataRate.getMParameter().getPhdfSauna2().getQuantity();
mdc = calculateDataRate.getMParameter().getPhdfSauna2().getMdc();
collectLow = calculateDataRate.getMParameter().getPhdfSauna2().getCollectLow();
collectHigh = calculateDataRate.getMParameter().getPhdfSauna2().getCollectHigh();
xeVolume = calculateDataRate.getMParameter().getPhdfSauna2().getXeVolume();
nuclideName = calculateDataRate.getMParameter().getPhdfSauna2().getNuclideName();
liveQc = calculateDataRate.getMParameter().getPhdfSauna2().getLiveQc();
number = calculateDataRate.getMParameter().getPhdfSauna2().getNumber();
}
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencySauna(liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, curDateTime, pretime, number, stationId);
if (Objects.nonNull(phdfProvisionEfficiency)) {
double phdf_efficient = phdfProvisionEfficiency.getDataEfficiency();
mRate.setPhdfEfficient(phdf_efficient);
}
//判断当前台站编码是否属于特殊计算的台站 计算PHD的数据提供率
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
number = param.getPhd().getNumber();
} else {
number = calculateDataRate.getMParameter().getPhdSauna2().getNumber();
}
ProvisionData phdProvisionRate = calCulStationDataService.findPhdProvisionRateSauna2(curDateTime, pretime, number, stationId);
if (Objects.nonNull(phdProvisionRate)) {
double phd_offered = phdProvisionRate.getDataRate();
mRate.setPhdOffered(phd_offered);
}
//判断当前台站编码是否属于特殊计算的台站 计算PHD的数据提供率
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
liveLow = param.getPhd().getLiveLow();
liveHigh = param.getPhd().getLiveHigh();
quantity = param.getPhd().getQuantity();
mdc = param.getPhd().getMdc();
collectLow = param.getPhd().getCollectLow();
collectHigh = param.getPhd().getCollectHigh();
xeVolume = param.getPhd().getXeVolume();
nuclideName = param.getPhd().getNuclideName();
liveQc = param.getPhd().getLiveQc();
number = param.getPhd().getNumber();
} else {
liveLow = calculateDataRate.getMParameter().getPhdSauna2().getLiveLow();
liveHigh = calculateDataRate.getMParameter().getPhdSauna2().getLiveHigh();
quantity = calculateDataRate.getMParameter().getPhdSauna2().getQuantity();
mdc = calculateDataRate.getMParameter().getPhdSauna2().getMdc();
collectLow = calculateDataRate.getMParameter().getPhdSauna2().getCollectLow();
collectHigh = calculateDataRate.getMParameter().getPhdSauna2().getCollectHigh();
xeVolume = calculateDataRate.getMParameter().getPhdSauna2().getXeVolume();
nuclideName = calculateDataRate.getMParameter().getPhdSauna2().getNuclideName();
liveQc = calculateDataRate.getMParameter().getPhdSauna2().getLiveQc();
number = calculateDataRate.getMParameter().getPhdSauna2().getNumber();
}
ProvisionData phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencySauna2(liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, curDateTime, pretime, number, stationId);
if (Objects.nonNull(phdProvisionEfficiency)) {
double phd_efficient = phdProvisionEfficiency.getDataEfficiency();
mRate.setPhdEfficient(phd_efficient);
}
//判断当前台站编码是否属于特殊计算的台站 计算MET的数据提供率
String met;
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
met = param.getMet();
} else {
met = calculateDataRate.getMParameter().getMet();
}
ProvisionData metProvision = calCulStationDataService.findMetProvisionSauna(curDateTime, pretime, met, stationId);
if (Objects.nonNull(metProvision)) {
double metNum = metProvision.getDataRate();
mRate.setMet(metNum);
}
//判断当前台站编码是否属于特殊计算的台站 计算SOH的数据提供率
String soh;
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
soh = param.getSoh();
} else {
soh = calculateDataRate.getMParameter().getSoh();
}
ProvisionData sohProvision = calCulStationDataService.findSohProvisionSauna(curDateTime, pretime, soh, stationId);
if (Objects.nonNull(sohProvision)) {
double sohNum = sohProvision.getDataRate();
mRate.setSoh(sohNum);
}
//计算SPHD+MET+SOH数据提供率 SPHD部分
ProvisionData sphdProvision = calCulStationDataService.findSphdProvisionSauna2(curDateTime, pretime, stationId);
String SPHD_NUM = "0";
if (Objects.nonNull(sphdProvision)) {
SPHD_NUM = sphdProvision.getDataNumber().toString();
}
//获取SPHD+MET+SOH数据提供率 MET部分
ProvisionData sphdMetProvision = calCulStationDataService.findSphdMetProvisionSauna(curDateTime, pretime, stationId);
String MET_NUM = "0";
if (Objects.nonNull(sphdMetProvision)) {
MET_NUM = sphdMetProvision.getDataNumber().toString();
}
//判断当前台站编码是否属于特殊计算的台站 计算SOH的数据提供率
String sphdMetSoh;
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
sphdMetSoh = param.getSphdMetSoh();
} else {
sphdMetSoh = calculateDataRate.getMParameter().getSphdMetSoh().getSaunaEverydaynums();
}
ProvisionData sphdMetSohProvision = calCulStationDataService.findSphdMetSohProvisionSauna(SPHD_NUM, MET_NUM, curDateTime, pretime, sphdMetSoh, stationId);
if (Objects.nonNull(sphdMetSohProvision)) {
double phd_met_soh = sphdMetSohProvision.getDataRate();
mRate.setPhdMetSoh(phd_met_soh);
}
return mRate;
}
public Rate spalaxcalc(CalculateDataRate calculateDataRate) {
Rate mRate = new Rate();
//获取特殊台站相关集合
Map<String, Specialpara> mSpecialparam = calculateDataRate.getMSpecialparam();
@ -300,7 +465,7 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String number = param.getPhdf().getNumber();
phdfProvisionRate = calCulStationDataService.findPhdfProvisionRateSpalax(curDateTime, pretime, number, stationId);
}else {
} else {
String number = calculateDataRate.getMParameter().getPhdfSpalax().getNumber();
phdfProvisionRate = calCulStationDataService.findPhdfProvisionRateSpalax(curDateTime, pretime, number, stationId);
}
@ -320,7 +485,7 @@ public class CalculateDataRateThread implements Runnable{
String liveQc = param.getPhdf().getLiveQc();
String number = param.getPhdf().getNumber();
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencySpalax(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime, pretime, number, stationId);
}else {
} else {
String liveLow = calculateDataRate.getMParameter().getPhdfSpalax().getLiveLow();
String liveHigh = calculateDataRate.getMParameter().getPhdfSpalax().getLiveHigh();
String quantity = calculateDataRate.getMParameter().getPhdfSpalax().getQuantity();
@ -328,7 +493,7 @@ public class CalculateDataRateThread implements Runnable{
String collectHigh = calculateDataRate.getMParameter().getPhdfSpalax().getCollectHigh();
String liveQc = calculateDataRate.getMParameter().getPhdfSpalax().getLiveQc();
String number = calculateDataRate.getMParameter().getPhdfSpalax().getNumber();
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencySpalax(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime,pretime, number,stationId);
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencySpalax(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime, pretime, number, stationId);
}
if (Objects.nonNull(phdfProvisionEfficiency)) {
Double phdf_efficient = phdfProvisionEfficiency.getDataEfficiency();
@ -340,7 +505,7 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String number = param.getPhd().getNumber();
phdProvisionRate = calCulStationDataService.findPhdProvisionRateSpalax(curDateTime, pretime, number, stationId);
}else {
} else {
String number = calculateDataRate.getMParameter().getPhdSpalax().getNumber();
phdProvisionRate = calCulStationDataService.findPhdProvisionRateSpalax(curDateTime, pretime, number, stationId);
}
@ -360,7 +525,7 @@ public class CalculateDataRateThread implements Runnable{
String liveQc = param.getPhd().getLiveQc();
String number = param.getPhd().getNumber();
phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencySpalax(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime, pretime, number, stationId);
}else {
} else {
String liveLow = calculateDataRate.getMParameter().getPhdSpalax().getLiveLow();
String liveHigh = calculateDataRate.getMParameter().getPhdSpalax().getLiveHigh();
String quantity = calculateDataRate.getMParameter().getPhdSpalax().getQuantity();
@ -368,7 +533,7 @@ public class CalculateDataRateThread implements Runnable{
String collectHigh = calculateDataRate.getMParameter().getPhdSpalax().getCollectHigh();
String liveQc = calculateDataRate.getMParameter().getPhdSpalax().getLiveQc();
String number = calculateDataRate.getMParameter().getPhdSpalax().getNumber();
phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencySpalax(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime,pretime, number,stationId);
phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencySpalax(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime, pretime, number, stationId);
}
if (Objects.nonNull(phdProvisionEfficiency)) {
Double phd_efficient = phdProvisionEfficiency.getDataEfficiency();
@ -380,7 +545,7 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String met = param.getMet();
metProvision = calCulStationDataService.findMetProvisionSpalax(curDateTime, pretime, met, stationId);
}else {
} else {
String met = calculateDataRate.getMParameter().getMet();
metProvision = calCulStationDataService.findMetProvisionSpalax(curDateTime, pretime, met, stationId);
}
@ -394,7 +559,7 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String soh = param.getSoh();
sohProvision = calCulStationDataService.findSohProvisionSpalax(curDateTime, pretime, soh, stationId);
}else {
} else {
String soh = calculateDataRate.getMParameter().getSoh();
sohProvision = calCulStationDataService.findSohProvisionSpalax(curDateTime, pretime, soh, stationId);
}
@ -413,7 +578,7 @@ public class CalculateDataRateThread implements Runnable{
//获取SPHD+MET+SOH数据提供率 MET部分
ProvisionData sphdMetProvision = calCulStationDataService.findSphdMetProvisionSpalax(curDateTime, pretime, stationId);
String MET_NUM = "0";
if (Objects.nonNull(sphdMetProvision)){
if (Objects.nonNull(sphdMetProvision)) {
MET_NUM = sphdMetProvision.getDataNumber().toString();
}
@ -422,18 +587,166 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String sphdMetSoh = param.getSphdMetSoh();
sphdMetSohProvision = calCulStationDataService.findSphdMetSohProvisionSpalax(SPHD_NUM, MET_NUM, curDateTime, pretime, sphdMetSoh, stationId);
}else {
} else {
String sphdMetSoh = calculateDataRate.getMParameter().getSphdMetSoh().getSpalaxEverydaynums();
sphdMetSohProvision = calCulStationDataService.findSphdMetSohProvisionSpalax(SPHD_NUM, MET_NUM, curDateTime, pretime, sphdMetSoh, stationId);
}
if (Objects.nonNull(sphdMetSohProvision)){
if (Objects.nonNull(sphdMetSohProvision)) {
Double phd_met_soh = sphdMetSohProvision.getDataRate();
mRate.setPhdMetSoh(phd_met_soh);
}
return mRate;
}
public Rate particulatecalc(CalculateDataRate calculateDataRate){
public Rate spalaxcalcPLC(CalculateDataRate calculateDataRate) {
Rate mRate = new Rate();
//region 局部变量
//获取特殊台站相关集合
Map<String, Specialpara> mSpecialparam = calculateDataRate.getMSpecialparam();
//根据台站名称获取对应的 参数信息
Specialpara param = mSpecialparam.get(calculateDataRate.getMStationCode());
//获取日期间隔
double dayspan = calculateDataRate.getMParameter().getDayspan();
//获取当前日期
LocalDateTime currentTime = LocalDateTime.now();
//当前日期转换成字符串格式
String curDateTime = currentTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
//当前日期减去对应的时间间隔 获取开始时间 并转换成字符串格式
String pretime = currentTime.minusDays((long) dayspan).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
//获取台站id
String stationId = calculateDataRate.getMStationId();
String liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, number;
//endregion
//判断当前台站编码是否属于特殊计算的台站 计算PHDF的数据提供率
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
number = param.getPhdf().getNumber();
} else {
number = calculateDataRate.getMParameter().getPhdfSpalaxPLC().getNumber();
}
ProvisionData phdfProvisionRate = calCulStationDataService.findPhdfProvisionRateSpalax(curDateTime, pretime, number, stationId);
if (Objects.nonNull(phdfProvisionRate)) {
double phdf_offered = phdfProvisionRate.getDataRate();
mRate.setPhdfOffered(phdf_offered);
}
//判断当前台站编码是否属于特殊计算的台站 计算PHDF的数据提供率
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
liveLow = param.getPhdf().getLiveLow();
liveHigh = param.getPhdf().getLiveHigh();
quantity = param.getPhdf().getQuantity();
collectLow = param.getPhdf().getCollectLow();
collectHigh = param.getPhdf().getCollectHigh();
liveQc = param.getPhdf().getLiveQc();
number = param.getPhdf().getNumber();
}
else {
liveLow = calculateDataRate.getMParameter().getPhdfSpalaxPLC().getLiveLow();
liveHigh = calculateDataRate.getMParameter().getPhdfSpalaxPLC().getLiveHigh();
quantity = calculateDataRate.getMParameter().getPhdfSpalaxPLC().getQuantity();
collectLow = calculateDataRate.getMParameter().getPhdfSpalaxPLC().getCollectLow();
collectHigh = calculateDataRate.getMParameter().getPhdfSpalaxPLC().getCollectHigh();
liveQc = calculateDataRate.getMParameter().getPhdfSpalaxPLC().getLiveQc();
number = calculateDataRate.getMParameter().getPhdfSpalaxPLC().getNumber();
}
ProvisionData phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencySpalaxPLC(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime, pretime, number, stationId);
if (Objects.nonNull(phdfProvisionEfficiency)) {
double phdf_efficient = phdfProvisionEfficiency.getDataEfficiency();
mRate.setPhdfEfficient(phdf_efficient);
}
//判断当前台站编码是否属于特殊计算的台站 计算PHD的数据提供率
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
number = param.getPhd().getNumber();
} else {
number = calculateDataRate.getMParameter().getPhdSpalaxPLC().getNumber();
}
ProvisionData phdProvisionRate = calCulStationDataService.findPhdProvisionRateSpalaxPLC(curDateTime, pretime, number, stationId);
if (Objects.nonNull(phdProvisionRate)) {
double phd_offered = phdProvisionRate.getDataRate();
mRate.setPhdOffered(phd_offered);
}
//判断当前台站编码是否属于特殊计算的台站 计算PHD的数据提供率
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
liveLow = param.getPhd().getLiveLow();
liveHigh = param.getPhd().getLiveHigh();
quantity = param.getPhd().getQuantity();
collectLow = param.getPhd().getCollectLow();
collectHigh = param.getPhd().getCollectHigh();
liveQc = param.getPhd().getLiveQc();
number = param.getPhd().getNumber();
}
else {
liveLow = calculateDataRate.getMParameter().getPhdSpalaxPLC().getLiveLow();
liveHigh = calculateDataRate.getMParameter().getPhdSpalaxPLC().getLiveHigh();
quantity = calculateDataRate.getMParameter().getPhdSpalaxPLC().getQuantity();
collectLow = calculateDataRate.getMParameter().getPhdSpalaxPLC().getCollectLow();
collectHigh = calculateDataRate.getMParameter().getPhdSpalaxPLC().getCollectHigh();
liveQc = calculateDataRate.getMParameter().getPhdSpalaxPLC().getLiveQc();
number = calculateDataRate.getMParameter().getPhdSpalaxPLC().getNumber();
}
ProvisionData phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencySpalaxPLC(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime, pretime, number, stationId);
if (Objects.nonNull(phdProvisionEfficiency)) {
double phd_efficient = phdProvisionEfficiency.getDataEfficiency();
mRate.setPhdEfficient(phd_efficient);
}
//判断当前台站编码是否属于特殊计算的台站 计算MET的数据提供率
String met;
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
met = param.getMet();
} else {
met = calculateDataRate.getMParameter().getMet();
}
ProvisionData metProvision = calCulStationDataService.findMetProvisionSpalax(curDateTime, pretime, met, stationId);
if (Objects.nonNull(metProvision)) {
double metNum = metProvision.getDataRate();
mRate.setMet(metNum);
}
//判断当前台站编码是否属于特殊计算的台站 计算SOH的数据提供率
String soh;
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
soh = param.getSoh();
} else {
soh = calculateDataRate.getMParameter().getSoh();
}
ProvisionData sohProvision = calCulStationDataService.findSohProvisionSpalax(curDateTime, pretime, soh, stationId);
if (Objects.nonNull(sohProvision)) {
double sohNum = sohProvision.getDataRate();
mRate.setSoh(sohNum);
}
//计算SPHD+MET+SOH数据提供率 SPHD部分
ProvisionData sphdProvision = calCulStationDataService.findSphdProvisionSpalax(curDateTime, pretime, stationId);
String SPHD_NUM = "0";
if (Objects.nonNull(sphdProvision)) {
SPHD_NUM = sphdProvision.getDataNumber().toString();
}
//获取SPHD+MET+SOH数据提供率 MET部分
ProvisionData sphdMetProvision = calCulStationDataService.findSphdMetProvisionSpalax(curDateTime, pretime, stationId);
String MET_NUM = "0";
if (Objects.nonNull(sphdMetProvision)) {
MET_NUM = sphdMetProvision.getDataNumber().toString();
}
//判断当前台站编码是否属于特殊计算的台站 计算SOH的数据提供率
String sphdMetSoh;
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
sphdMetSoh = param.getSphdMetSoh();
} else {
sphdMetSoh = calculateDataRate.getMParameter().getSphdMetSoh().getSpalaxEverydaynums();
}
ProvisionData sphdMetSohProvision = calCulStationDataService.findSphdMetSohProvisionSpalax(SPHD_NUM, MET_NUM, curDateTime, pretime, sphdMetSoh, stationId);
if (Objects.nonNull(sphdMetSohProvision)) {
double phd_met_soh = sphdMetSohProvision.getDataRate();
mRate.setPhdMetSoh(phd_met_soh);
}
return mRate;
}
public Rate particulatecalc(CalculateDataRate calculateDataRate) {
Rate mRate = new Rate();
//获取特殊台站相关集合
Map<String, Specialpara> mSpecialparam = calculateDataRate.getMSpecialparam();
@ -454,7 +767,7 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String number = param.getPhdf().getNumber();
phdfProvisionRate = calCulStationDataService.findPhdfProvisionRateParticulate(curDateTime, pretime, number, stationId);
}else {
} else {
String number = calculateDataRate.getMParameter().getPhdfParticulate().getNumber();
phdfProvisionRate = calCulStationDataService.findPhdfProvisionRateParticulate(curDateTime, pretime, number, stationId);
}
@ -473,14 +786,14 @@ public class CalculateDataRateThread implements Runnable{
String collectHigh = param.getPhdf().getCollectHigh();
String number = param.getPhdf().getNumber();
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencyParticulate(liveLow, liveHigh, quantity, collectLow, collectHigh, curDateTime, pretime, number, stationId);
}else {
} else {
String liveLow = calculateDataRate.getMParameter().getPhdfParticulate().getLiveLow();
String liveHigh = calculateDataRate.getMParameter().getPhdfParticulate().getLiveHigh();
String quantity = calculateDataRate.getMParameter().getPhdfParticulate().getQuantity();
String collectLow = calculateDataRate.getMParameter().getPhdfParticulate().getCollectLow();
String collectHigh = calculateDataRate.getMParameter().getPhdfParticulate().getCollectHigh();
String number = calculateDataRate.getMParameter().getPhdfParticulate().getNumber();
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencyParticulate(liveLow, liveHigh, quantity, collectLow, collectHigh, curDateTime,pretime, number,stationId);
phdfProvisionEfficiency = calCulStationDataService.findPhdfProvisionEfficiencyParticulate(liveLow, liveHigh, quantity, collectLow, collectHigh, curDateTime, pretime, number, stationId);
}
if (Objects.nonNull(phdfProvisionEfficiency)) {
Double phdf_efficient = phdfProvisionEfficiency.getDataEfficiency();
@ -492,11 +805,11 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String number = param.getPhd().getNumber();
phdProvisionRate = calCulStationDataService.findPhdProvisionRateParticulate(curDateTime, pretime, number, stationId);
}else {
} else {
String number = calculateDataRate.getMParameter().getPhdParticulate().getNumber();
phdProvisionRate = calCulStationDataService.findPhdProvisionRateParticulate(curDateTime, pretime, number, stationId);
}
if (Objects.nonNull(phdProvisionRate)){
if (Objects.nonNull(phdProvisionRate)) {
Double phd_offered = phdProvisionRate.getDataRate();
mRate.setPhdOffered(phd_offered);
}
@ -511,14 +824,14 @@ public class CalculateDataRateThread implements Runnable{
String collectHigh = param.getPhd().getCollectHigh();
String number = param.getPhd().getNumber();
phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencyParticulate(liveLow, liveHigh, quantity, collectLow, collectHigh, curDateTime, pretime, number, stationId);
}else {
} else {
String liveLow = calculateDataRate.getMParameter().getPhdParticulate().getLiveLow();
String liveHigh = calculateDataRate.getMParameter().getPhdParticulate().getLiveHigh();
String quantity = calculateDataRate.getMParameter().getPhdParticulate().getQuantity();
String collectLow = calculateDataRate.getMParameter().getPhdParticulate().getCollectLow();
String collectHigh = calculateDataRate.getMParameter().getPhdParticulate().getCollectHigh();
String number = calculateDataRate.getMParameter().getPhdParticulate().getNumber();
phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencyParticulate(liveLow, liveHigh, quantity, collectLow, collectHigh, curDateTime, pretime, number,stationId);
phdProvisionEfficiency = calCulStationDataService.findPhdProvisionEfficiencyParticulate(liveLow, liveHigh, quantity, collectLow, collectHigh, curDateTime, pretime, number, stationId);
}
if (Objects.nonNull(phdProvisionEfficiency)) {
Double phd_efficient = phdProvisionEfficiency.getDataEfficiency();
@ -530,7 +843,7 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String met = param.getMet();
metProvision = calCulStationDataService.findMetProvisionParticulate(curDateTime, pretime, met, stationId);
}else {
} else {
String met = calculateDataRate.getMParameter().getMet();
metProvision = calCulStationDataService.findMetProvisionParticulate(curDateTime, pretime, met, stationId);
}
@ -544,7 +857,7 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String soh = param.getSoh();
sohProvision = calCulStationDataService.findSohProvisionParticulate(curDateTime, pretime, soh, stationId);
}else {
} else {
String soh = calculateDataRate.getMParameter().getSoh();
sohProvision = calCulStationDataService.findSohProvisionParticulate(curDateTime, pretime, soh, stationId);
}
@ -571,7 +884,7 @@ public class CalculateDataRateThread implements Runnable{
if (mSpecialparam.containsKey(calculateDataRate.getMStationCode())) {
String sphdMetSoh = param.getSphdMetSoh();
sphdMetSohProvision = calCulStationDataService.findSphdMetSohProvisionParticulate(SPHD_NUM, MET_NUM, curDateTime, pretime, sphdMetSoh, stationId);
}else {
} else {
String sphdMetSoh = calculateDataRate.getMParameter().getSphdMetSoh().getParticulateEverydaynums();
sphdMetSohProvision = calCulStationDataService.findSphdMetSohProvisionParticulate(SPHD_NUM, MET_NUM, curDateTime, pretime, sphdMetSoh, stationId);
}

View File

@ -25,6 +25,7 @@ public class CalculateDataRate implements Serializable {
private String mStationCode;
private String mStationType;
private String mEfficCalculType;
double mDayspan; // 天数用来统计数据接受率和有效率

View File

@ -14,14 +14,17 @@ public class Parameter implements Serializable {
private double good;
private StationTypeData phdfSauna;
private StationTypeData phdfSauna2;
private StationTypeData phdfSpalax;
private StationTypeData phdfSpalaxPLC;
private StationTypeData phdfParticulate;
private StationTypeData phdSauna;
private StationTypeData phdSauna2;
private StationTypeData phdSpalax;
private StationTypeData phdSpalaxPLC;
private StationTypeData phdParticulate;

View File

@ -37,4 +37,6 @@ public class StationInfo implements Serializable {
private String quality;
private String efficCalculType;
}

View File

@ -66,4 +66,17 @@ public interface CalCulStationInfoMapper {
List<Integer> getUsed(Integer stationId);
//region 新加计算台站类型数据提供率
ProvisionData findPhdfProvisionRateSauna2(@Param("curDateTime") String curDateTime, @Param("pretime") String pretime, @Param("number") String number, @Param("stationId") String stationId);
ProvisionData findPhdProvisionRateSauna2(@Param("curDateTime") String curDateTime, @Param("pretime") String pretime, @Param("number") String number, @Param("stationId") String stationId);
ProvisionData findPhdProvisionEfficiencySauna2(@Param("liveLow") String liveLow,@Param("liveHigh") String liveHigh,@Param("quantity") String quantity,@Param("mdc") String mdc,@Param("collectLow") String collectLow,@Param("collectHigh") String collectHigh,@Param("xeVolume") String xeVolume,@Param("nuclideName") String nuclideName,@Param("liveQc") String liveQc,@Param("curDateTime") String curDateTime,@Param("pretime") String pretime,@Param("number") String number,@Param("stationId") String stationId);
ProvisionData findSphdProvisionSauna2(@Param("curDateTime") String curDateTime, @Param("pretime") String pretime, @Param("stationId") String stationId);
ProvisionData findPhdfProvisionEfficiencySpalaxPLC(@Param("liveLow") String liveLow,@Param("liveHigh") String liveHigh,@Param("quantity") String quantity, @Param("collectLow") String collectLow,@Param("collectHigh") String collectHigh, @Param("liveQc") String liveQc,@Param("curDateTime") String curDateTime,@Param("pretime") String pretime,@Param("number") String number,@Param("stationId") String stationId);
ProvisionData findPhdProvisionRateSpalaxPLC(@Param("curDateTime") String curDateTime, @Param("pretime") String pretime, @Param("number") String number, @Param("stationId") String stationId);
ProvisionData findPhdProvisionEfficiencySpalaxPLC(@Param("liveLow") String liveLow,@Param("liveHigh") String liveHigh,@Param("quantity") String quantity, @Param("collectLow") String collectLow,@Param("collectHigh") String collectHigh, @Param("liveQc") String liveQc,@Param("curDateTime") String curDateTime,@Param("pretime") String pretime,@Param("number") String number,@Param("stationId") String stationId);
//endregion
}

View File

@ -27,7 +27,22 @@
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr(sta.station_code, 3,1)='X'
and sta.type='SAUNA'
and sta.EFFIC_CALCUL_TYPE='SAUNA'
and sdata.spectral_qualifie='FULL' and sdata.SAMPLE_TYPE='B'
and sdata.station_id = #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
</where>
</select>
<select id="findPhdfProvisionRateSauna2" resultType="org.jeecg.modules.entity.data.ProvisionData">
select
count(sdata.station_id) dataNumber,
ROUND(count(sdata.station_id)/(to_number(TO_DATE('${curDateTime}','YYYY-MM-DD hh24:mi:ss')-TO_DATE('${pretime}','YYYY-MM-DD hh24:mi:ss'))*${number})*100,2) dataRate
from ORIGINAL.GARDS_SAMPLE_DATA sdata
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr(sta.station_code, 3,1)='X'
and sta.EFFIC_CALCUL_TYPE='SAUNA2'
and sdata.spectral_qualifie='FULL' and sdata.SAMPLE_TYPE='B'
and sdata.station_id = #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
@ -79,7 +94,22 @@
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr( sta.station_code, 3,1)='X'
and sta.type='SAUNA'
and sta.EFFIC_CALCUL_TYPE='SAUNA'
and SDATA.SAMPLE_TYPE='B'
and sdata.station_id= #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
</where>
</select>
<select id="findPhdProvisionRateSauna2" resultType="org.jeecg.modules.entity.data.ProvisionData">
select
(sum(case when SDATA.DATA_TYPE='S' then 1 else 0 end)+sum(case when SDATA.DATA_TYPE='G' then 1 else 0 end)+sum(case when SDATA.DATA_TYPE='Q' and SDATA.SPECTRAL_QUALIFIE='FULL' then 1 else 0 end)) dataNumber,
ROUND(count(sdata.station_id)/(to_number(TO_DATE('${curDateTime}','YYYY-MM-DD hh24:mi:ss')-TO_DATE('${pretime}','YYYY-MM-DD hh24:mi:ss')+1)* ${number})*100,2) dataRate
from ORIGINAL.GARDS_SAMPLE_DATA sdata
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr( sta.station_code, 3,1)='X'
and sta.EFFIC_CALCUL_TYPE='SAUNA2'
and SDATA.SAMPLE_TYPE='B'
and sdata.station_id= #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
@ -104,7 +134,31 @@
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr( sta.station_code, 3,1)='X' and SDATA.SAMPLE_TYPE='B'
and sta.type='SAUNA'
and sta.EFFIC_CALCUL_TYPE='SAUNA'
and sdata.station_id = #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
</where>
</select>
<select id="findPhdProvisionEfficiencySauna2" resultType="org.jeecg.modules.entity.data.ProvisionData">
select (sum(case when ROUND(sdata.acquisition_live_sec/60/60.00) BETWEEN ${liveLow} and ${liveHigh}
and sdata.quantity> ${quantity} and xe.MDC> ${mdc}
and (to_number(SDATA.COLLECT_STOP - SDATA.COLLECT_START)*24) BETWEEN ${collectLow} and ${collectHigh}
and aux.xe_volume> ${xeVolume} and xe.nuclide_name= '${nuclideName}' and sdata.data_type='S' then 1 else 0 end)
+ sum(case when sdata.acquisition_live_sec> ${liveQc} and sdata.data_type='Q' and sdata.spectral_qualifie='FULL' then 1 else 0 end)
+ sum(case when ROUND(sdata.acquisition_live_sec/60/60.00,2) BETWEEN ${liveLow} and ${liveHigh} and sdata.data_type='G' then 1 else 0 end)) dataNumber,
ROUND((sum(case when ROUND(sdata.acquisition_live_sec/60/60.00) BETWEEN ${liveLow} and ${liveHigh} and sdata.quantity>${quantity} and xe.MDC> ${mdc}
and (to_number(SDATA.COLLECT_STOP - SDATA.COLLECT_START)*24) BETWEEN ${collectLow} and ${collectHigh}
and aux.xe_volume> ${xeVolume} and xe.nuclide_name= '${nuclideName}' and sdata.data_type='S' then 1 else 0 end)
+ sum(case when sdata.acquisition_live_sec> ${liveQc} and sdata.data_type='Q' and sdata.spectral_qualifie='FULL' then 1 else 0 end)
+ sum(case when ROUND(sdata.acquisition_live_sec/60/60.00,2) BETWEEN ${liveLow} and ${liveHigh} and sdata.data_type='G' then 1 else 0 end))/(to_number(TO_DATE('${curDateTime}','YYYY-MM-DD hh24:mi:ss')-TO_DATE('${pretime}','YYYY-MM-DD hh24:mi:ss')+1)* ${number})*100,2) dataEfficiency
from ORIGINAL.GARDS_SAMPLE_DATA sdata
LEFT JOIN RNAUTO.GARDS_XE_RESULTS xe on xe.sample_id = sdata.sample_id
LEFT JOIN ORIGINAL.GARDS_SAMPLE_AUX aux on aux.sample_id = sdata.sample_id
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr( sta.station_code, 3,1)='X' and SDATA.SAMPLE_TYPE='B'
and sta.EFFIC_CALCUL_TYPE='SAUNA2'
and sdata.station_id = #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
</where>
@ -138,7 +192,21 @@
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr( sta.station_code,3,1)='X'
and sta.type='SAUNA'
and sta.EFFIC_CALCUL_TYPE='SAUNA'
and SDATA.SAMPLE_TYPE = 'B'
and sdata.station_id= #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
</where>
</select>
<select id="findSphdProvisionSauna2" resultType="org.jeecg.modules.entity.data.ProvisionData">
select (SUM(case when SDATA.DATA_TYPE = 'S' then 1 else 0 end)
+ sum(case when SDATA.DATA_TYPE = 'Q' and SDATA.SPECTRAL_QUALIFIE = 'FULL' then 1 else 0 end)
+ sum(case when SDATA.DATA_TYPE = 'G' then 1 else 0 end)) dataNumber
from ORIGINAL.GARDS_SAMPLE_DATA sdata
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr( sta.station_code,3,1)='X'
and sta.EFFIC_CALCUL_TYPE='SAUNA2'
and SDATA.SAMPLE_TYPE = 'B'
and sdata.station_id= #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
@ -189,7 +257,27 @@
LEFT JOIN ORIGINAL.GARDS_SAMPLE_AUX aux on aux.sample_id = sdata.sample_id
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
sta.type='SPALAX'
sta.EFFIC_CALCUL_TYPE='SPALAX'
and SDATA.SAMPLE_TYPE='G'
and substr( sta.station_code, 3,1)='X'
and sdata.station_id=#{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
</where>
</select>
<select id="findPhdfProvisionEfficiencySpalaxPLC" resultType="org.jeecg.modules.entity.data.ProvisionData">
select (sum(case when sdata.acquisition_live_sec> ${liveQc} and sdata.data_type='Q' and sdata.spectral_qualifie='FULL' then 1 else 0 end)
+sum(case when sdata.data_type='S' and (sdata. acquisition_live_sec/60/60.00) BETWEEN ${liveLow} and ${liveHigh}
and (to_number(SDATA.COLLECT_STOP - SDATA.COLLECT_START)*24) BETWEEN ${collectLow} and ${collectHigh} and sdata.quantity>${quantity} then 1 else 0 end)) dataNumber,
ROUND((sum(case when sdata.acquisition_live_sec> ${liveQc} and sdata.data_type='Q' and sdata.spectral_qualifie='FULL' then 1 else 0 end)
+sum(case when sdata.data_type='S' and (sdata. acquisition_live_sec/60/60.00) BETWEEN ${liveLow} and ${liveHigh}
and (to_number(SDATA.COLLECT_STOP - SDATA.COLLECT_START)*24) BETWEEN ${collectLow} and ${collectHigh}
and sdata.quantity>${quantity} then 1 else 0 end)) / (to_number(TO_DATE('${curDateTime}','YYYY-MM-DD hh24:mi:ss')-TO_DATE('${pretime}','YYYY-MM-DD hh24:mi:ss')+1)* ${number})*100,2) dataEfficiency
from ORIGINAL.GARDS_SAMPLE_DATA sdata
LEFT JOIN RNAUTO.GARDS_XE_RESULTS xe on xe.sample_id = sdata.sample_id
LEFT JOIN ORIGINAL.GARDS_SAMPLE_AUX aux on aux.sample_id = sdata.sample_id
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
sta.EFFIC_CALCUL_TYPE='SPALAX_PLC'
and SDATA.SAMPLE_TYPE='G'
and substr( sta.station_code, 3,1)='X'
and sdata.station_id=#{stationId}
@ -205,7 +293,20 @@
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr( sta.station_code, 3,1)='X' and SDATA.SAMPLE_TYPE='G'
and sta.type='SPALAX'
and sta.EFFIC_CALCUL_TYPE='SPALAX'
and sdata.station_id= #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
</where>
</select>
<select id="findPhdProvisionRateSpalaxPLC" resultType="org.jeecg.modules.entity.data.ProvisionData">
select (sum(case when SDATA.DATA_TYPE='S' then 1 else 0 end)+sum(case when SDATA.DATA_TYPE='Q' and SDATA.SPECTRAL_QUALIFIE='FULL' then 1 else 0 end)) dataNumber,
ROUND((sum(case when SDATA.DATA_TYPE='S' then 1 else 0 end)
+sum(case when SDATA.DATA_TYPE='Q' and SDATA.SPECTRAL_QUALIFIE='FULL' then 1 else 0 end))/(to_number(TO_DATE('${curDateTime}','YYYY-MM-DD hh24:mi:ss')-TO_DATE('${pretime}','YYYY-MM-DD hh24:mi:ss')+1)* ${number})*100,2) dataRate
from ORIGINAL.GARDS_SAMPLE_DATA sdata
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
substr( sta.station_code, 3,1)='X' and SDATA.SAMPLE_TYPE='G'
and sta.EFFIC_CALCUL_TYPE='SPALAX_PLC'
and sdata.station_id= #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
</where>
@ -221,7 +322,7 @@
from ORIGINAL.GARDS_SAMPLE_DATA sdata
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
sta.type='SPALAX'
sta.EFFIC_CALCUL_TYPE='SPALAX'
and SDATA.SAMPLE_TYPE='G'
and substr( sta.station_code, 3,1)='X'
and sdata.station_id= #{stationId}
@ -229,6 +330,26 @@
</where>
</select>
<select id="findPhdProvisionEfficiencySpalaxPLC" resultType="org.jeecg.modules.entity.data.ProvisionData">
select (sum(case when sdata.acquisition_live_sec> ${liveQc} and sdata.data_type='Q' and sdata.spectral_qualifie='FULL' then 1 else 0 end)
+sum(case when sdata.data_type='S' and (sdata. acquisition_live_sec/60/60.00) BETWEEN ${liveLow} and ${liveHigh}
and (to_number(SDATA.COLLECT_STOP - SDATA.COLLECT_START)*24) BETWEEN ${collectLow} and ${collectHigh} and sdata.quantity>${quantity} then 1 else 0 end)) dataNumber,
ROUND((sum(case when sdata.acquisition_live_sec> ${liveQc} and sdata.data_type='Q' and sdata.spectral_qualifie='FULL' then 1 else 0 end)
+sum(case when sdata.data_type='S' and (sdata. acquisition_live_sec/60/60.00) BETWEEN ${liveLow} and ${liveHigh}
and (to_number(SDATA.COLLECT_STOP - SDATA.COLLECT_START)*24) BETWEEN ${collectLow} and ${collectHigh} and sdata.quantity>${quantity} then 1 else 0 end))/ (to_number(TO_DATE('${curDateTime}','YYYY-MM-DD hh24:mi:ss')-TO_DATE('${pretime}','YYYY-MM-DD hh24:mi:ss')+1)* ${number})*100,2) dataEfficiency
from ORIGINAL.GARDS_SAMPLE_DATA sdata
LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id
<where>
sta.EFFIC_CALCUL_TYPE='SPALAX_PLC'
and SDATA.SAMPLE_TYPE='G'
and substr( sta.station_code, 3,1)='X'
and sdata.station_id= #{stationId}
and to_char(sdata.ACQUISITION_START,'YYYY-MM-DD hh24:mi:ss') BETWEEN #{pretime} and #{curDateTime}
</where>
</select>
<select id="findMetProvisionSpalax" resultType="org.jeecg.modules.entity.data.ProvisionData">
SELECT COUNT(STATION_ID) dataNumber,
ROUND(COUNT(STATION_ID)/(to_number(TO_DATE('${curDateTime}','YYYY-MM-DD hh24:mi:ss')-TO_DATE('${pretime}','YYYY-MM-DD hh24:mi:ss')+1)* ${met})*100,2)dataRate

View File

@ -23,7 +23,7 @@ public interface ICalCulStationDataService {
ProvisionData findSphdMetProvisionSauna(String curDateTime, String pretime, String stationId);
ProvisionData findSphdMetSohProvisionSauna(String SPHD_NUM, String MET_NUM, String curDateTime, String pretime, String sphdMetSoh,String stationId);
ProvisionData findSphdMetSohProvisionSauna(String SPHD_NUM, String MET_NUM, String curDateTime, String pretime, String sphdMetSoh, String stationId);
ProvisionData findPhdfProvisionRateSpalax(String curDateTime, String pretime, String number, String stationId);
@ -41,7 +41,7 @@ public interface ICalCulStationDataService {
ProvisionData findSphdMetProvisionSpalax(String curDateTime, String pretime, String stationId);
ProvisionData findSphdMetSohProvisionSpalax(String SPHD_NUM, String MET_NUM, String curDateTime, String pretime, String sphdMetSoh,String stationId);
ProvisionData findSphdMetSohProvisionSpalax(String SPHD_NUM, String MET_NUM, String curDateTime, String pretime, String sphdMetSoh, String stationId);
ProvisionData findPhdfProvisionRateParticulate(String curDateTime, String pretime, String number, String stationId);
@ -59,8 +59,96 @@ public interface ICalCulStationDataService {
ProvisionData findSphdMetProvisionParticulate(String curDateTime, String pretime, String stationId);
ProvisionData findSphdMetSohProvisionParticulate(String SPHD_NUM, String MET_NUM, String curDateTime, String pretime, String sphdMetSoh,String stationId);
ProvisionData findSphdMetSohProvisionParticulate(String SPHD_NUM, String MET_NUM, String curDateTime, String pretime, String sphdMetSoh, String stationId);
String getUsed(Integer stationId);
//region 新加计算类型
/**
* 计算PHDF的数据提供率
* @param curDateTime 当前时间
* @param pretime 开始时间
* @param number 数量
* @param stationId 台站ID
* @return ProvisionData
*/
ProvisionData findPhdfProvisionRateSauna2(String curDateTime, String pretime, String number, String stationId);
ProvisionData findPhdProvisionRateSauna2(String curDateTime, String pretime, String number, String stationId);
/**
* 计算PHD的数据有效率
* @param liveLow
* @param liveHigh
* @param quantity
* @param mdc
* @param collectLow
* @param collectHigh
* @param xeVolume
* @param nuclideName
* @param liveQc
* @param curDateTime
* @param pretime
* @param number
* @param stationId
* @return ProvisionData
*/
ProvisionData findPhdProvisionEfficiencySauna2(String liveLow, String liveHigh, String quantity, String mdc, String collectLow, String collectHigh, String xeVolume, String nuclideName, String liveQc, String curDateTime, String pretime, String number, String stationId);
/**
* 计算SPHD+MET+SOH数据提供率 SPHD部分
* @param curDateTime
* @param pretime
* @param stationId
* @return
*/
ProvisionData findSphdProvisionSauna2(String curDateTime, String pretime, String stationId);
/**
* 计算PHDF的数据有效率
* @param liveLow
* @param liveHigh
* @param quantity
* @param collectLow
* @param collectHigh
* @param liveQc
* @param curDateTime
* @param pretime
* @param number
* @param stationId
* @return
*/
ProvisionData findPhdfProvisionEfficiencySpalaxPLC(String liveLow, String liveHigh, String quantity, String collectLow, String collectHigh, String liveQc, String curDateTime, String pretime, String number, String stationId);
/**
*计算PHD的数据提供率
* @param curDateTime
* @param pretime
* @param number
* @param stationId
* @return
*/
ProvisionData findPhdProvisionRateSpalaxPLC(String curDateTime, String pretime, String number, String stationId);
/**
* 计算PHD的数据有效率
* @param liveLow
* @param liveHigh
* @param quantity
* @param collectLow
* @param collectHigh
* @param liveQc
* @param curDateTime
* @param pretime
* @param number
* @param stationId
* @return
*/
ProvisionData findPhdProvisionEfficiencySpalaxPLC(String liveLow, String liveHigh, String quantity, String collectLow, String collectHigh, String liveQc, String curDateTime, String pretime, String number, String stationId);
//endregion
}

View File

@ -26,9 +26,10 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
StationInfo stationInfo = calCulStationInfoMapper.getStationInfo(stationCode);
return stationInfo;
}
//region 查询数据提供率
/**
* 查询phdf的数据提供率
*
* @param curDateTime
* @param pretime
* @param number
@ -43,6 +44,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询phdf的数据提供率
*
* @param liveLow
* @param liveHigh
* @param quantity
@ -66,6 +68,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PHD数据提供率
*
* @param curDateTime
* @param pretime
* @param number
@ -80,6 +83,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PHD数据提供率
*
* @param liveLow
* @param liveHigh
* @param quantity
@ -104,6 +108,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询MET数据提供率
*
* @param curDateTime
* @param pretime
* @param met
@ -118,6 +123,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SOH数据提供率
*
* @param curDateTime
* @param pretime
* @param soh
@ -132,6 +138,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPHD MET SOh数据提供率 SPHD
*
* @param curDateTime
* @param pretime
* @param stationId
@ -145,6 +152,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPHD MET SOh数据提供率 MET
*
* @param curDateTime
* @param pretime
* @param stationId
@ -158,6 +166,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPHD MET SOh数据提供率
*
* @param SPHD_NUM
* @param MET_NUM
* @param curDateTime
@ -174,6 +183,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPALAX PHDF数据提供率
*
* @param curDateTime
* @param pretime
* @param number
@ -188,6 +198,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPALAX PHDF数据提供率
*
* @param liveLow
* @param liveHigh
* @param quantity
@ -208,6 +219,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPALAX PHD数据提供率
*
* @param curDateTime
* @param pretime
* @param number
@ -222,6 +234,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPALAX PHD数据提供率
*
* @param liveLow
* @param liveHigh
* @param quantity
@ -242,6 +255,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPALAX MET数据提供率
*
* @param curDateTime
* @param pretime
* @param met
@ -256,6 +270,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPALAX SOH数据提供率
*
* @param curDateTime
* @param pretime
* @param soh
@ -270,6 +285,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPALAX SPHD MET SOH数据提供率 SPHD
*
* @param curDateTime
* @param pretime
* @param stationId
@ -283,6 +299,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPALAX SPHD MET SOH数据提供率 MET
*
* @param curDateTime
* @param pretime
* @param stationId
@ -296,6 +313,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询SPALAX SPHD MET SOH数据提供率
*
* @param SPHD_NUM
* @param MET_NUM
* @param curDateTime
@ -312,6 +330,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PARTICULATE PHDF数据提供率
*
* @param curDateTime
* @param pretime
* @param number
@ -326,6 +345,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PARTICULATE PHDF数据提供率
*
* @param liveLow
* @param liveHigh
* @param quantity
@ -345,6 +365,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PARTICULATE PHD数据提供率
*
* @param curDateTime
* @param pretime
* @param number
@ -359,6 +380,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PARTICULATE PHD数据提供率
*
* @param liveLow
* @param liveHigh
* @param quantity
@ -378,6 +400,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PARTICULATE MET数据提供率
*
* @param curDateTime
* @param pretime
* @param met
@ -392,6 +415,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PARTICULATE SOH数据提供率
*
* @param curDateTime
* @param pretime
* @param soh
@ -406,6 +430,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PARTICULATE SPHD MET SOH数据提供率 SPHD
*
* @param curDateTime
* @param pretime
* @param stationId
@ -419,6 +444,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PARTICULATE SPHD MET SOH数据提供率 MET
*
* @param curDateTime
* @param pretime
* @param stationId
@ -432,6 +458,7 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
/**
* 查询PARTICULATE SPHD MET SOH数据提供率
*
* @param SPHD_NUM
* @param MET_NUM
* @param curDateTime
@ -448,11 +475,54 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public String getUsed(Integer stationId){
public String getUsed(Integer stationId) {
List<Integer> detectorIds = calCulStationInfoMapper.getUsed(stationId);
String result = CollectionUtils.isNotEmpty(detectorIds) ? "YES" : "NO";
return result;
}
//endregion
//region 新加计算台站类型数据提供率方法
@Override
public ProvisionData findPhdfProvisionRateSauna2(String curDateTime, String pretime, String number, String stationId) {
ProvisionData provisionRate=calCulStationInfoMapper.findPhdfProvisionRateSauna2(curDateTime, pretime, number, stationId);
return provisionRate;
}
@Override
public ProvisionData findPhdProvisionRateSauna2(String curDateTime, String pretime, String number, String stationId) {
ProvisionData provisionRate = calCulStationInfoMapper.findPhdProvisionRateSauna2(curDateTime, pretime, number, stationId);
return provisionRate;
}
@Override
public ProvisionData findPhdProvisionEfficiencySauna2(String liveLow, String liveHigh, String quantity, String mdc, String collectLow, String collectHigh, String xeVolume, String nuclideName, String liveQc, String curDateTime, String pretime, String number, String stationId) {
ProvisionData provisionEfficiency=calCulStationInfoMapper.findPhdProvisionEfficiencySauna2(liveLow, liveHigh, quantity, mdc, collectLow, collectHigh, xeVolume, nuclideName, liveQc, curDateTime, pretime, number, stationId);
return provisionEfficiency;
}
@Override
public ProvisionData findSphdProvisionSauna2(String curDateTime, String pretime, String stationId) {
ProvisionData sphdProvision = calCulStationInfoMapper.findSphdProvisionSauna2(curDateTime, pretime, stationId);
return sphdProvision;
}
@Override
public ProvisionData findPhdfProvisionEfficiencySpalaxPLC(String liveLow, String liveHigh, String quantity, String collectLow, String collectHigh, String liveQc, String curDateTime, String pretime, String number, String stationId) {
ProvisionData phdfProvisionEfficiency = calCulStationInfoMapper.findPhdfProvisionEfficiencySpalaxPLC(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime, pretime, number, stationId);
return phdfProvisionEfficiency;
}
@Override
public ProvisionData findPhdProvisionRateSpalaxPLC(String curDateTime, String pretime, String number, String stationId) {
ProvisionData phdProvisionRate = calCulStationInfoMapper.findPhdProvisionRateSpalaxPLC(curDateTime, pretime, number, stationId);
return phdProvisionRate;
}
@Override
public ProvisionData findPhdProvisionEfficiencySpalaxPLC(String liveLow, String liveHigh, String quantity, String collectLow, String collectHigh, String liveQc, String curDateTime, String pretime, String number, String stationId) {
ProvisionData phdProvisionEfficiency = calCulStationInfoMapper.findPhdProvisionEfficiencySpalaxPLC(liveLow, liveHigh, quantity, collectLow, collectHigh, liveQc, curDateTime, pretime, number, stationId);
return phdProvisionEfficiency;
}
//endregion
}

View File

@ -7,7 +7,7 @@
<item good="30"/>
</WARNING>
<PHDF>
<SAUNA>
<SAUNA1>
<item collect_low="10.8"/>
<item collect_high="13.2"/>
<item live_low="10.8"/>
@ -18,7 +18,19 @@
<item nuclide_name="Xe133"/>
<item live_qc="600"/>
<item number="8"/>
</SAUNA>
</SAUNA1>
<SAUNA2>
<item collect_low="5.4"/>
<item collect_high="6.6"/>
<item live_low="5.4"/>
<item live_high="6.6"/>
<item quantity="10"/>
<item xe_volume="0.87"/>
<item mdc="1"/>
<item nuclide_name="Xe133"/>
<item live_qc="600"/>
<item number="16"/>
</SAUNA2>
<SPALAX>
<item collect_low="21.6"/>
<item collect_high="26.4"/>
@ -28,6 +40,15 @@
<item live_qc="600"/>
<item number="2"/>
</SPALAX>
<SPALAX-PLC>
<item collect_low="10.8"/>
<item collect_high="13.2"/>
<item live_low="10"/>
<item live_high="11"/>
<item quantity="10"/>
<item live_qc="240"/>
<item number="4"/>
</SPALAX-PLC>
<PARTICULATE>
<item collect_low="21.6"/>
<item collect_high="26.4"/>
@ -38,7 +59,7 @@
</PARTICULATE>
</PHDF>
<PHD>
<SAUNA>
<SAUNA1>
<item collect_low="10.8"/>
<item collect_high="13.2"/>
<item live_low="1.8"/>
@ -49,7 +70,19 @@
<item nuclide_name="Xe133"/>
<item live_qc="600"/>
<item number="28"/>
</SAUNA>
</SAUNA1>
<SAUNA2>
<item collect_low="5.4"/>
<item collect_high="6.6"/>
<item live_low="5.4"/>
<item live_high="6.6"/>
<item quantity="10"/>
<item xe_volume="0.87"/>
<item mdc="1"/>
<item nuclide_name="Xe133"/>
<item live_qc="600"/>
<item number="36"/>
</SAUNA2>
<SPALAX>
<item collect_low="21.6"/>
<item collect_high="26.4"/>
@ -59,6 +92,15 @@
<item live_qc="600"/>
<item number="13"/>
</SPALAX>
<SPALAX-PLC>
<item collect_low="10.8"/>
<item collect_high="13.2"/>
<item live_low="10"/>
<item live_high="11"/>
<item quantity="10"/>
<item live_qc="240"/>
<item number="14"/>
</SPALAX-PLC>
<PARTICULATE>
<item collect_low="21.6"/>
<item collect_high="26.4"/>
@ -86,7 +128,6 @@
</PARTICULATE>
</SPHD_MET_SOH>
<SPECIAL>
<STATION name = "CMX13">
<PHDF>
<item collect_low="10.8"/>
@ -116,7 +157,6 @@
<item number="300"/>
</SPHD_MET_SOH>
</STATION>
<STATION name = "CNP20">
<PHDF>
<item collect_low="21.6"/>
@ -144,7 +184,6 @@
<item number="301"/>
</SPHD_MET_SOH>
</STATION>
<STATION name = "CNP21">
<PHDF>
<item collect_low="21.6"/>
@ -172,7 +211,6 @@
<item number="301"/>
</SPHD_MET_SOH>
</STATION>
<STATION name = "CNP22">
<PHDF>
<item collect_low="21.6"/>
@ -200,6 +238,5 @@
<item number="301"/>
</SPHD_MET_SOH>
</STATION>
</SPECIAL>
</config>