diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/configuration/GardsStations.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/configuration/GardsStations.java index 1787c66a..a0d89fcd 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/configuration/GardsStations.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/configuration/GardsStations.java @@ -101,4 +101,10 @@ public class GardsStations implements Serializable { @TableField(value = "CATEGORY") private Integer category; + /** + * 有效率计算类型 + */ + @TableField(value = "EFFIC_CALCUL_TYPE") + private String efficCalculType; + } diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/DataProvisionEfficiencyManager.java b/jeecg-module-station-operation/src/main/java/org/jeecg/DataProvisionEfficiencyManager.java index a41d4788..72771aa7 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/DataProvisionEfficiencyManager.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/DataProvisionEfficiencyManager.java @@ -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"); diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/common/CalculateDataRateThread.java b/jeecg-module-station-operation/src/main/java/org/jeecg/common/CalculateDataRateThread.java index af396cb8..5b7ff358 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/common/CalculateDataRateThread.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/common/CalculateDataRateThread.java @@ -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 @@ -45,11 +45,11 @@ 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"); @@ -89,10 +90,11 @@ 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 +103,29 @@ 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")) ) { + if ((StringUtils.isNotBlank(stationCode) && stationCode.substring(2, 3).equals("X")) && (StringUtils.isNotBlank(efficCalculType) && efficCalculType.equals("SAUNA"))) { //切割台站编码 如果 第三个字符是 X 并且 台站类型是 SAUNA mRate = saunacalc(calculateDataRate); - } else if((StringUtils.isNotBlank(stationCode) && stationCode.substring(2,3).equals("X")) && (StringUtils.isNotBlank(stationType) && stationType.equals("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.substring(2, 3).equals("X")) && (StringUtils.isNotBlank(efficCalculType) && efficCalculType.equals("SPALAX"))) { //切割台站编码 如果 第三个字符是 X 并且 台站类型是 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.substring(2, 3).equals("P")) { //切割台站编码 如果 第三个字符是 P mRate = particulatecalc(calculateDataRate); } return mRate; } - public Rate saunacalc(CalculateDataRate calculateDataRate){ + public Rate saunacalc(CalculateDataRate calculateDataRate) { Rate mRate = new Rate(); //获取特殊台站相关集合 Map 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); } @@ -255,7 +265,7 @@ public class CalculateDataRateThread implements Runnable{ ProvisionData sphdProvision = calCulStationDataService.findSphdProvisionSauna(curDateTime, pretime, stationId); String SPHD_NUM = "0"; if (Objects.nonNull(sphdProvision)) { - SPHD_NUM = sphdProvision.getDataNumber().toString(); + SPHD_NUM = sphdProvision.getDataNumber().toString(); } //获取SPHD+MET+SOH数据提供率 MET部分 ProvisionData sphdMetProvision = calCulStationDataService.findSphdMetProvisionSauna(curDateTime, pretime, stationId); @@ -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 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 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 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 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); } diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/CalculateDataRate.java b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/CalculateDataRate.java index 0e8cc14c..0d0a31f2 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/CalculateDataRate.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/CalculateDataRate.java @@ -25,6 +25,7 @@ public class CalculateDataRate implements Serializable { private String mStationCode; private String mStationType; + private String mEfficCalculType; double mDayspan; // 天数(用来统计数据接受率和有效率) diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/Parameter.java b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/Parameter.java index 949588ad..3a1291c7 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/Parameter.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/Parameter.java @@ -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; diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/StationInfo.java b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/StationInfo.java index cb614ead..a0f5b914 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/StationInfo.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/entity/data/StationInfo.java @@ -37,4 +37,6 @@ public class StationInfo implements Serializable { private String quality; + private String efficCalculType; + } diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/mapper/CalCulStationInfoMapper.java b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/mapper/CalCulStationInfoMapper.java index cf730183..68c617ba 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/mapper/CalCulStationInfoMapper.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/mapper/CalCulStationInfoMapper.java @@ -66,4 +66,17 @@ public interface CalCulStationInfoMapper { List 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 } diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/mapper/xml/calCulStationInfoMapper.xml b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/mapper/xml/calCulStationInfoMapper.xml index 52081c98..b3f4c43b 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/mapper/xml/calCulStationInfoMapper.xml +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/mapper/xml/calCulStationInfoMapper.xml @@ -27,7 +27,22 @@ LEFT JOIN CONFIGURATION.GARDS_STATIONS sta on sta.station_id = sdata.station_id 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} + + + + + + + + + + + + + + +