Commit 06778e93 authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 75aee235 835f83a5
......@@ -18,51 +18,51 @@ public class BoilerTechParamsDefine implements ITechParamDefine {
private String deviceLevel;
@TechnicalParameter(key = "ratedEvaporationCapacityThermalPower", label = "额定蒸发量(热功率)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedEvaporationCapacityThermalPower", label = "额定蒸发量(热功率)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "t/h(MW)")
private String ratedEvaporationCapacityThermalPower;
@TechnicalParameter(key = "ratedWorkingPressure", label = "额定工作压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedWorkingPressure", label = "额定工作压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String ratedWorkingPressure;
@TechnicalParameter(key = "ratedOperatingTemperature", label = "额定工作温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedOperatingTemperature", label = "额定工作温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String ratedOperatingTemperature;
@TechnicalParameter(key = "designThermalEfficiency", label = "设计热效率", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "designThermalEfficiency", label = "设计热效率", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "%")
private String designThermalEfficiency;
@TechnicalParameter(key = "feedwaterTemperature", label = "给水温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "feedwaterTemperature", label = "给水温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String feedwaterTemperature;
@TechnicalParameter(key = "ratedOutletReturnWaterOilTemperature", label = "额定出/回水(油)温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedOutletReturnWaterOilTemperature", label = "额定出/回水(油)温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String ratedOutletReturnWaterOilTemperature;
@TechnicalParameter(key = "waterOilVolumeOfBoilerProper", label = "锅炉本体水(油)容积", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "waterOilVolumeOfBoilerProper", label = "锅炉本体水(油)容积", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "L")
private String waterOilVolumeOfBoilerProper;
@TechnicalParameter(key = "hydraulicTestMediumPressureOfPackagedBoilerBody", label = "整装锅炉本体液压试验介质/压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "hydraulicTestMediumPressureOfPackagedBoilerBody", label = "整装锅炉本体液压试验介质/压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String hydraulicTestMediumPressureOfPackagedBoilerBody;
@TechnicalParameter(key = "inletOutletTemperatureOfReheater", label = "再热器进(出)口温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "inletOutletTemperatureOfReheater", label = "再热器进(出)口温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String inletOutletTemperatureOfReheater;
@TechnicalParameter(key = "reheaterInletOutletPressure", label = "再热器进(出)口压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "reheaterInletOutletPressure", label = "再热器进(出)口压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String reheaterInletOutletPressure;
@TechnicalParameter(key = "reheatSteamFlow", label = "再热蒸汽流量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "reheatSteamFlow", label = "再热蒸汽流量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "t/h")
private String reheatSteamFlow;
@TechnicalParameter(key = "glAirtightTest", label = "有机热载体锅炉气密试验介质/压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "glAirtightTest", label = "有机热载体锅炉气密试验介质/压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String glAirtightTest;
......@@ -78,7 +78,7 @@ public class BoilerTechParamsDefine implements ITechParamDefine {
private String materialOfPressureParts;
@TechnicalParameter(key = "wallThicknessOfPressureParts", label = "受压部件壁厚", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "wallThicknessOfPressureParts", label = "受压部件壁厚", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String wallThicknessOfPressureParts;
......@@ -86,15 +86,15 @@ public class BoilerTechParamsDefine implements ITechParamDefine {
private String nonDestructiveTestingMethodsForPressureParts;
@TechnicalParameter(key = "proportionOfNdtForPressureParts", label = "受压部件无损检测比例", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "proportionOfNdtForPressureParts", label = "受压部件无损检测比例", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "%")
private String proportionOfNdtForPressureParts;
@TechnicalParameter(key = "heatTreatmentTemperatureOfPressureParts", label = "受压部件热处理温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "heatTreatmentTemperatureOfPressureParts", label = "受压部件热处理温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String heatTreatmentTemperatureOfPressureParts;
@TechnicalParameter(key = "heatTreatmentTimeOfPressureParts", label = "受压部件热处理时间", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "heatTreatmentTimeOfPressureParts", label = "受压部件热处理时间", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "h")
private String heatTreatmentTimeOfPressureParts;
......@@ -102,7 +102,7 @@ public class BoilerTechParamsDefine implements ITechParamDefine {
private String hydrostaticTestMedium;
@TechnicalParameter(key = "hydrostaticTestPressure", label = "受压部件水(耐)压试验压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "hydrostaticTestPressure", label = "受压部件水(耐)压试验压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String hydrostaticTestPressure;
......
......@@ -15,31 +15,31 @@ import lombok.Data;
public class ElevatorTechParamDefine implements ITechParamDefine {
@TechnicalParameter(key = "ratedSpeedUp", label = "额定速度(上行)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedSpeedUp", label = "额定速度(上行)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/s")
private String ratedSpeedUp;
@TechnicalParameter(key = "ratedSpeedDown", label = "额定速度(下行)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedSpeedDown", label = "额定速度(下行)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/s")
private String ratedSpeedDown;
@TechnicalParameter(key = "ratedLoadCapacity", label = "额定载重量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedLoadCapacity", label = "额定载重量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "kg")
private String ratedLoadCapacity;
@TechnicalParameter(key = "liftingHeight", label = "提升高度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "liftingHeight", label = "提升高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String liftingHeight;
@TechnicalParameter(key = "deviceLevel", label = "层数", type = TechnicalParameter.ParamType.INTEGER)
@TechnicalParameter(key = "deviceLevel", label = "层数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "层")
private Integer deviceLevel;
@TechnicalParameter(key = "stand", label = "站数", type = TechnicalParameter.ParamType.INTEGER)
@TechnicalParameter(key = "stand", label = "站数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "站")
private Integer stand;
@TechnicalParameter(key = "numberDoors", label = "门数", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "numberDoors", label = "门数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "门数")
private Integer numberDoors;
......@@ -47,7 +47,7 @@ public class ElevatorTechParamDefine implements ITechParamDefine {
private String controlMode;
@TechnicalParameter(key = "numberCylinders", label = "油缸数量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "numberCylinders", label = "油缸数量", type = TechnicalParameter.ParamType.BIG_DECIMAL)
private Integer numberCylinders;
......@@ -63,22 +63,22 @@ public class ElevatorTechParamDefine implements ITechParamDefine {
private String explosionproofSignComplete;
@TechnicalParameter(key = "nominalSpeed", label = "名义速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "nominalSpeed", label = "名义速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/s")
private String nominalSpeed;
@TechnicalParameter(key = "nominalWidth", label = "名义宽度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "nominalWidth", label = "名义宽度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String nominalWidth;
@TechnicalParameter(key = "angleRoll", label = "倾斜角", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "angleRoll", label = "倾斜角", type = TechnicalParameter.ParamType.BIG_DECIMAL)
private String angleRoll;
@TechnicalParameter(key = "useSectionLength", label = "使用区段长度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "useSectionLength", label = "使用区段长度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String useSectionLength;
@TechnicalParameter(key = "conveyingCapacity", label = "输送能力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "conveyingCapacity", label = "输送能力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "P/h")
private String conveyingCapacity;
......@@ -86,6 +86,6 @@ public class ElevatorTechParamDefine implements ITechParamDefine {
private String doorPosition;
@TechnicalParameter(key = "ratedSpeed", label = "额定速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedSpeed", label = "额定速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/s")
private String ratedSpeed;
}
......@@ -14,27 +14,27 @@ import lombok.Data;
@Group("4000")
public class LiftingTechParamDefine implements ITechParamDefine {
@TechnicalParameter(key = "ratedLiftingCapacity", label = "额定起重量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedLiftingCapacity", label = "额定起重量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "t")
private String ratedLiftingCapacity;
@TechnicalParameter(key = "maxLiftingCapacity", label = "最大起重量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "maxLiftingCapacity", label = "最大起重量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "t")
private String maxLiftingCapacity;
@TechnicalParameter(key = "maxLiftingTorque", label = "最大起重力矩", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "maxLiftingTorque", label = "最大起重力矩", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "KN.m")
private String maxLiftingTorque;
@TechnicalParameter(key = "spanWorkingRange", label = "跨度(工作幅度)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "spanWorkingRange", label = "跨度(工作幅度)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String spanWorkingRange;
@TechnicalParameter(key = "liftingSpeed", label = "起升速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "liftingSpeed", label = "起升速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/min")
private String liftingSpeed;
@TechnicalParameter(key = "liftingHeight", label = "起升高度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "liftingHeight", label = "起升高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String liftingHeight;
......@@ -42,59 +42,59 @@ public class LiftingTechParamDefine implements ITechParamDefine {
private String workLevel;
@TechnicalParameter(key = "ratedLiftingTorque", label = "额定起重力矩", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedLiftingTorque", label = "额定起重力矩", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "KN.m")
private String ratedLiftingTorque;
@TechnicalParameter(key = "numberStorey", label = "层数/泊位数", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "numberStorey", label = "层数/泊位数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "层")
private Integer numberStorey;
@TechnicalParameter(key = "runningSpeed", label = "运行速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "runningSpeed", label = "运行速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/min")
private String runningSpeed;
@TechnicalParameter(key = "bigcarRunSpeed", label = "大车运行速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "bigcarRunSpeed", label = "大车运行速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/min")
private String bigcarRunSpeed;
@TechnicalParameter(key = "smallcarrunSpeed", label = "小车运行速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "smallcarrunSpeed", label = "小车运行速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/min")
private String smallcarrunSpeed;
@TechnicalParameter(key = "ratedMembers", label = "额定成员数", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedMembers", label = "额定乘员数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "人")
private Integer ratedMembers;
@TechnicalParameter(key = "ratedLiftingSpeed", label = "额定提升速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedLiftingSpeed", label = "额定提升速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/min")
private String ratedLiftingSpeed;
@TechnicalParameter(key = "heightFreeEnd", label = "自由端高度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "heightFreeEnd", label = "自由端高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String heightFreeEnd;
@TechnicalParameter(key = "workStrokeCage", label = "吊笼工作行程", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "workStrokeCage", label = "吊笼工作行程", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String workStrokeCage;
@TechnicalParameter(key = "storageCapacity", label = "存容量", type = TechnicalParameter.ParamType.INTEGER)
@TechnicalParameter(key = "storageCapacity", label = "存容量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "辆")
private Integer storageCapacity;
@TechnicalParameter(key = "ratedLiftSpeed", label = "额定升降速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedLiftSpeed", label = "额定升降速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/min")
private String ratedLiftSpeed;
@TechnicalParameter(key = "ratedTraverseSpeed", label = "额定横移速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedTraverseSpeed", label = "额定横移速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/min")
private String ratedTraverseSpeed;
@TechnicalParameter(key = "bicycleMaxExitTime", label = "单车最大进(出)车时间", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "bicycleMaxExitTime", label = "单车最大进(出)车时间", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "s")
private String bicycleMaxExitTime;
@TechnicalParameter(key = "bicycleMaxComeTime", label = "单车最大进车时间", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "bicycleMaxComeTime", label = "单车最大进车时间", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "s")
private String bicycleMaxComeTime;
......@@ -102,14 +102,14 @@ public class LiftingTechParamDefine implements ITechParamDefine {
private String explosionProofGrade;
@TechnicalParameter(key = "cantileverLength", label = "悬臂长度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "cantileverLength", label = "悬臂长度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String cantileverLength;
@TechnicalParameter(key = "derrickingSpeed", label = "变幅速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "derrickingSpeed", label = "变幅速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/min")
private String derrickingSpeed;
@TechnicalParameter(key = "hangingCagesNumber", label = "吊笼数量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "hangingCagesNumber", label = "吊笼数量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "个")
private String hangingCagesNumber;
......@@ -121,19 +121,19 @@ public class LiftingTechParamDefine implements ITechParamDefine {
private String explosionproofSignComplete;
@TechnicalParameter(key = "ratedSpeedUp", label = "监检结束高度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedSpeedUp", label = "监检结束高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String ratedSpeedUp;
@TechnicalParameter(key = "parkingVehicleHeight", label = "适停车辆尺寸高", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "parkingVehicleHeight", label = "适停车辆尺寸高", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String parkingVehicleHeight;
@TechnicalParameter(key = "parkingVehicleWeight", label = "适停车辆尺寸宽", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "parkingVehicleWeight", label = "适停车辆尺寸宽", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String parkingVehicleWeight;
@TechnicalParameter(key = "parkingVehicleLength", label = "适停车辆尺寸长", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "parkingVehicleLength", label = "适停车辆尺寸长", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String parkingVehicleLength;
}
......@@ -35,11 +35,11 @@ public class PipelineTechParamDefine implements ITechParamDefine {
private String wallThickness;
@TechnicalParameter(key = "pipeLength", label = "管道长度", type = TechnicalParameter.ParamType.FLOAT)
@TechnicalParameter(key = "pipeLength", label = "管道长度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private Double pipeLength;
@TechnicalParameter(key = "pressure", label = "设计压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "pressure", label = "设计压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "Mpa")
private String pressure;
......
......@@ -15,47 +15,47 @@ import lombok.Data;
public class RidesTechParamDefine implements ITechParamDefine {
@TechnicalParameter(key = "trackHeight", label = "轨道高度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "trackHeight", label = "轨道高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String trackHeight;
@TechnicalParameter(key = "runningSpeed", label = "运行速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "runningSpeed", label = "运行速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "km/h (m/s)")
private String runningSpeed;
@TechnicalParameter(key = "numberOfPassengers", label = "乘坐人数", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "numberOfPassengers", label = "乘坐人数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "人")
private Integer numberOfPassengers;
@TechnicalParameter(key = "slideLength", label = "滑道长度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "slideLength", label = "滑道长度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String slideLength;
@TechnicalParameter(key = "operatingHeight", label = "运行高度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "operatingHeight", label = "运行高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String operatingHeight;
@TechnicalParameter(key = "slideHeight", label = "蹦极绳长度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "slideHeight", label = "蹦极绳长度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String slideHeight;
@TechnicalParameter(key = "rotaryDiameter", label = "回转直径", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "rotaryDiameter", label = "回转直径", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String rotaryDiameter;
@TechnicalParameter(key = "unilateralSwingAngle", label = "单边摆角", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "unilateralSwingAngle", label = "单边摆角", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "°")
private String unilateralSwingAngle;
@TechnicalParameter(key = "numberOfVehicles", label = "车辆数", type = TechnicalParameter.ParamType.INTEGER)
@TechnicalParameter(key = "numberOfVehicles", label = "车辆数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "个")
private Integer numberOfVehicles;
@TechnicalParameter(key = "dip", label = "倾角", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "dip", label = "倾角", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "°")
private String dip;
@TechnicalParameter(key = "equipmentHeight", label = "设备高度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "equipmentHeight", label = "设备高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String equipmentHeight;
}
......@@ -14,15 +14,15 @@ import lombok.Data;
@Group("9000")
public class RopewayTechParamDefine implements ITechParamDefine {
@TechnicalParameter(key = "horizontalDistance", label = "平距", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "horizontalDistance", label = "平距", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String horizontalDistance;
@TechnicalParameter(key = "supportsCount", label = "支架数目", type = TechnicalParameter.ParamType.INTEGER)
@TechnicalParameter(key = "supportsCount", label = "支架数目", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "座")
private Integer supportsCount;
@TechnicalParameter(key = "obliqueLength", label = "斜长", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "obliqueLength", label = "斜长", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String obliqueLength;
......@@ -30,33 +30,33 @@ public class RopewayTechParamDefine implements ITechParamDefine {
private String mainMotorModel;
@TechnicalParameter(key = "mainMotorPower", label = "主电机功率", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "mainMotorPower", label = "主电机功率", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "W")
private String mainMotorPower;
@TechnicalParameter(key = "altitudeDifference", label = "高差", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "altitudeDifference", label = "高差", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String altitudeDifference;
@TechnicalParameter(key = "freightVolume", label = "运量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "freightVolume", label = "运量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "p/h")
private String freightVolume;
@TechnicalParameter(key = "carrierLine", label = "运载索", type = TechnicalParameter.ParamType.STRING, dictCode = "YZS")
private String carrierLine;
@TechnicalParameter(key = "speed", label = "速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "speed", label = "速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/s")
private String speed;
@TechnicalParameter(key = "bearingCable", label = "承载索", type = TechnicalParameter.ParamType.STRING)
private String bearingCable;
@TechnicalParameter(key = "cablePitch", label = "索距", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "cablePitch", label = "索距", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m")
private String cablePitch;
@TechnicalParameter(key = "oilPressureHeavyHammer", label = "张紧油压(重锤重量)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "oilPressureHeavyHammer", label = "张紧油压(重锤重量)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String oilPressureHeavyHammer;
......
......@@ -23,7 +23,7 @@ public class VehicleTechParamDefine implements ITechParamDefine {
private String engineNo;
@TechnicalParameter(key = "liftingCapacity", label = "额定起重量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "liftingCapacity", label = "额定起重量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "Kg")
private String liftingCapacity;
......@@ -31,18 +31,18 @@ public class VehicleTechParamDefine implements ITechParamDefine {
private String transmissionMode;
@TechnicalParameter(key = "weight", label = "自重", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "weight", label = "自重", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "Kg")
private String weight;
@TechnicalParameter(key = "powerMode", label = "动力方式", type = TechnicalParameter.ParamType.STRING)
private String powerMode;
@TechnicalParameter(key = "maxRunningSpeed", label = "最大运行速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "maxRunningSpeed", label = "最大运行速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "km/h")
private String maxRunningSpeed;
@TechnicalParameter(key = "maxLiftingHeight", label = "工作装置空载最大起升高度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "maxLiftingHeight", label = "工作装置空载最大起升高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String maxLiftingHeight;
......@@ -58,7 +58,7 @@ public class VehicleTechParamDefine implements ITechParamDefine {
private String drivingMode;
@TechnicalParameter(key = "carryingIdlerMaxRunningSpeed", label = "空载最大运行速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "carryingIdlerMaxRunningSpeed", label = "空载最大运行速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "km/h")
private String carryingIdlerMaxRunningSpeed;
......@@ -70,43 +70,43 @@ public class VehicleTechParamDefine implements ITechParamDefine {
private String temperatureGroup;
@TechnicalParameter(key = "passengersNumber", label = "额定载客人数", type = TechnicalParameter.ParamType.INTEGER)
@TechnicalParameter(key = "passengersNumber", label = "额定载客人数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "人")
private Integer passengersNumber;
@TechnicalParameter(key = "maxDrivingSlope", label = "最大行驶坡度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "maxDrivingSlope", label = "最大行驶坡度", type = TechnicalParameter.ParamType.BIG_DECIMAL)
private String maxDrivingSlope;
@TechnicalParameter(key = "vehicleMass", label = "整车整备质量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "vehicleMass", label = "整车整备质量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "Kg")
private String vehicleMass;
@TechnicalParameter(key = "wheelBase", label = "轴距", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "wheelBase", label = "轴距", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String wheelBase;
@TechnicalParameter(key = "trackWidthFront", label = "轮距(前)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "trackWidthFront", label = "轮距(前)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String trackWidthFront;
@TechnicalParameter(key = "trackWidthBehind", label = "轮距(后)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "trackWidthBehind", label = "轮距(后)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String trackWidthBehind;
@TechnicalParameter(key = "carsNumber", label = "观光列车车厢数", type = TechnicalParameter.ParamType.INTEGER)
@TechnicalParameter(key = "carsNumber", label = "观光列车车厢数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "节")
private Integer carsNumber;
@TechnicalParameter(key = "seatNumber", label = "观光列车每节车厢座位数", type = TechnicalParameter.ParamType.INTEGER)
@TechnicalParameter(key = "seatNumber", label = "观光列车每节车厢座位数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "个")
private Integer seatNumber;
@TechnicalParameter(key = "tractorSeatNumber", label = "观光列车牵引车头座位数", type = TechnicalParameter.ParamType.INTEGER)
@TechnicalParameter(key = "tractorSeatNumber", label = "观光列车牵引车头座位数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "个")
private Integer tractorSeatNumber;
@TechnicalParameter(key = "maxLiftingSpeed", label = "空载最大起升速度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "maxLiftingSpeed", label = "空载最大起升速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "km/h")
private String maxLiftingSpeed;
}
......@@ -14,22 +14,22 @@ import lombok.Data;
@Group("2000")
public class VesselTechParamsDefine implements ITechParamDefine {
@TechnicalParameter(key = "ratedQuality", label = "额定质量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedQuality", label = "额定质量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "kg")
private String ratedQuality;
@TechnicalParameter(key = "ambientTemperature", label = "使用环境温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ambientTemperature", label = "使用环境温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String ambientTemperature;
@TechnicalParameter(key = "modelNumber", label = "型号", type = TechnicalParameter.ParamType.STRING)
private String modelNumber;
@TechnicalParameter(key = "num", label = "数量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "num", label = "数量", type = TechnicalParameter.ParamType.BIG_DECIMAL)
private Integer num;
@TechnicalParameter(key = "singleBottleVolume", label = "单瓶容积", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "singleBottleVolume", label = "单瓶容积", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "L")
private String singleBottleVolume;
@TechnicalParameter(key = "totalVolume", label = "总容积", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "totalVolume", label = "总容积", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m³")
private String totalVolume;
@TechnicalParameter(key = "chargingMedium", label = "充装介质", type = TechnicalParameter.ParamType.STRING)
......@@ -38,16 +38,16 @@ public class VesselTechParamsDefine implements ITechParamDefine {
@TechnicalParameter(key = "specification", label = "规格", type = TechnicalParameter.ParamType.STRING)
private String specification;
@TechnicalParameter(key = "outsideDiameter", label = "外径", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "outsideDiameter", label = "外径", type = TechnicalParameter.ParamType.BIG_DECIMAL)
private String outsideDiameter;
@TechnicalParameter(key = "wallThickness", label = "壁厚", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "wallThickness", label = "壁厚", type = TechnicalParameter.ParamType.BIG_DECIMAL)
private String wallThickness;
@TechnicalParameter(key = "length", label = "长度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "length", label = "长度", type = TechnicalParameter.ParamType.BIG_DECIMAL)
private String length;
@TechnicalParameter(key = "nominalWorkingPressure", label = "公称工作压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "nominalWorkingPressure", label = "公称工作压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String nominalWorkingPressure;
@TechnicalParameter(key = "bottleBody", label = "材料(瓶体)", type = TechnicalParameter.ParamType.STRING)
......@@ -65,47 +65,47 @@ public class VesselTechParamsDefine implements ITechParamDefine {
@TechnicalParameter(key = "glLossless", label = "无损检测方法(管路)", type = TechnicalParameter.ParamType.STRING)
private String glLossless;
@TechnicalParameter(key = "qpRatio", label = "无损检测比例(气瓶)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "qpRatio", label = "无损检测比例(气瓶)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "%")
private String qpRatio;
@TechnicalParameter(key = "glRatio", label = "无损检测比例(管路)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "glRatio", label = "无损检测比例(管路)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "%")
private String glRatio;
@TechnicalParameter(key = "qpPressure", label = "耐压试验压力(气瓶)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "qpPressure", label = "耐压试验压力(气瓶)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String qpPressure;
@TechnicalParameter(key = "glPressure", label = "耐压试验压力(管路)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "glPressure", label = "耐压试验压力(管路)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String glPressure;
@TechnicalParameter(key = "qpAirTightness", label = "气密性试验压力(气瓶)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "qpAirTightness", label = "气密性试验压力(气瓶)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String qpAirTightness;
@TechnicalParameter(key = "glAirTightness", label = "气密性试验压力(管路)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "glAirTightness", label = "气密性试验压力(管路)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String glAirTightness;
@TechnicalParameter(key = "displacementPressure", label = "气体置换后压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "displacementPressure", label = "气体置换后压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String displacementPressure;
@TechnicalParameter(key = "oxygen", label = "瓶体内含氧量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "oxygen", label = "瓶体内含氧量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "%")
private String oxygen;
@TechnicalParameter(key = "heatTreatmentMethod", label = "瓶体内含氧量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "heatTreatmentMethod", label = "瓶体内含氧量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "%")
private String heatTreatmentMethod;
@TechnicalParameter(key = "qpHeatTreatmentTemperature", label = "热处理温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "qpHeatTreatmentTemperature", label = "热处理温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String qpHeatTreatmentTemperature;
@TechnicalParameter(key = "installationPosition", label = "气瓶安装位置", type = TechnicalParameter.ParamType.STRING)
private String installationPosition;
@TechnicalParameter(key = "containerVolume", label = "容器容积", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "containerVolume", label = "容器容积", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m³")
private String containerVolume;
@TechnicalParameter(key = "pressureVesselDiameter", label = "容器内径", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "pressureVesselDiameter", label = "容器内径", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String pressureVesselDiameter;
@TechnicalParameter(key = "height", label = "容器高(长)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "height", label = "容器高(长)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String height;
@TechnicalParameter(key = "materialCylinderShell", label = "材料(筒体(球壳))", type = TechnicalParameter.ParamType.STRING)
......@@ -120,22 +120,22 @@ public class VesselTechParamsDefine implements ITechParamDefine {
@TechnicalParameter(key = "materialJacket", label = "材料(夹套)", type = TechnicalParameter.ParamType.STRING)
private String materialJacket;
@TechnicalParameter(key = "thickness", label = "厚度(筒体(球壳))", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "thickness", label = "厚度(筒体(球壳))", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String thickness;
@TechnicalParameter(key = "fixedHead", label = "厚度(封头)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "fixedHead", label = "厚度(封头)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String fixedHead;
@TechnicalParameter(key = "fixedLining", label = "厚度(衬里)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "fixedLining", label = "厚度(衬里)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String fixedLining;
@TechnicalParameter(key = "fixedJacket", label = "厚度(夹套)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "fixedJacket", label = "厚度(夹套)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String fixedJacket;
@TechnicalParameter(key = "selfWeight", label = "容器自重", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "selfWeight", label = "容器自重", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "kg")
private String selfWeight;
@TechnicalParameter(key = "mediumWeight", label = "盛装介质重量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "mediumWeight", label = "盛装介质重量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "kg")
private String mediumWeight;
@TechnicalParameter(key = "pressureHousingPath", label = "设计压力(壳程)", type = TechnicalParameter.ParamType.STRING)
......@@ -147,13 +147,13 @@ public class VesselTechParamsDefine implements ITechParamDefine {
@TechnicalParameter(key = "pressureJacket", label = "设计压力(夹套)", type = TechnicalParameter.ParamType.STRING)
private String pressureJacket;
@TechnicalParameter(key = "temperatureShell", label = "设计温度(壳程)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "temperatureShell", label = "设计温度(壳程)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String temperatureShell;
@TechnicalParameter(key = "temperaturePipe", label = "设计温度(管程)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "temperaturePipe", label = "设计温度(管程)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String temperaturePipe;
@TechnicalParameter(key = "temperatureJacket", label = "设计温度(夹套)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "temperatureJacket", label = "设计温度(夹套)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String temperatureJacket;
@TechnicalParameter(key = "maxPressureShell", label = "最高允许工作压力(壳程)", type = TechnicalParameter.ParamType.STRING)
......@@ -206,11 +206,11 @@ public class VesselTechParamsDefine implements ITechParamDefine {
private String leakage;
@TechnicalParameter(key = "withstandPressureTest", label = "泄漏试验压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "withstandPressureTest", label = "泄漏试验压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String withstandPressureTest;
@TechnicalParameter(key = "leakPressure", label = "泄漏试验压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "leakPressure", label = "泄漏试验压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String leakPressure;
......@@ -222,11 +222,11 @@ public class VesselTechParamsDefine implements ITechParamDefine {
private String carNum;
@TechnicalParameter(key = "volume", label = "容积", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "volume", label = "容积", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "L")
private String volume;
@TechnicalParameter(key = "maxFill", label = "最大充装量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "maxFill", label = "最大充装量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "kg")
private String maxFill;
......@@ -234,15 +234,15 @@ public class VesselTechParamsDefine implements ITechParamDefine {
private String designPressure;
@TechnicalParameter(key = "designTemperature", label = "设计温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "designTemperature", label = "设计温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String designTemperature;
@TechnicalParameter(key = "workingPressure", label = "工作压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "workingPressure", label = "工作压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String workingPressure;
@TechnicalParameter(key = "workTemperature", label = "工作温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "workTemperature", label = "工作温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String workTemperature;
......@@ -250,11 +250,11 @@ public class VesselTechParamsDefine implements ITechParamDefine {
private String materialCylinder;
@TechnicalParameter(key = "thicknessCylinder", label = "厚度(筒体)", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "thicknessCylinder", label = "厚度(筒体)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String thicknessCylinder;
@TechnicalParameter(key = "corrosionMargin", label = "腐蚀裕量", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "corrosionMargin", label = "腐蚀裕量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private String corrosionMargin;
......@@ -266,7 +266,7 @@ public class VesselTechParamsDefine implements ITechParamDefine {
private String oxygenChamber;
@TechnicalParameter(key = "ratedEntryCapacity", label = "额定进舱人数", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "ratedEntryCapacity", label = "额定进舱人数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "人")
private Integer ratedEntryCapacity;
......@@ -274,11 +274,11 @@ public class VesselTechParamsDefine implements ITechParamDefine {
private String chamberMain;
@TechnicalParameter(key = "chamberPressure", label = "压力", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "chamberPressure", label = "压力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "MPa")
private String chamberPressure;
@TechnicalParameter(key = "temperature", label = "温度", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "temperature", label = "温度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "℃")
private String temperature;
......@@ -286,7 +286,7 @@ public class VesselTechParamsDefine implements ITechParamDefine {
private String pressureMedium;
@TechnicalParameter(key = "perCapitaCabinCapacity", label = "人均舱容", type = TechnicalParameter.ParamType.STRING)
@TechnicalParameter(key = "perCapitaCabinCapacity", label = "人均舱容", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m³")
private String perCapitaCabinCapacity;
......
......@@ -8,6 +8,7 @@ import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
......@@ -131,6 +132,13 @@ public class EsBaseEnterpriseInfo {
@Field(type = FieldType.Nested)
private List<License> licenses;
/**
* 创建时间
*/
@Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second)
private LocalDateTime createDate;
@Data
public static class License {
......@@ -204,5 +212,6 @@ public class EsBaseEnterpriseInfo {
*/
@Field(type = FieldType.Date, format = DateFormat.date)
private LocalDate issueDate;
}
}
......@@ -8,6 +8,7 @@ import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
......@@ -176,6 +177,12 @@ public class EsUserInfo {
@Field(type = FieldType.Nested)
private List<License> licenses;
/**
* 创建时间
*/
@Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second)
private LocalDateTime createDate;
@Data
public static class License {
......
......@@ -1424,6 +1424,7 @@ public class DataHandlerServiceImpl {
EsBaseEnterpriseInfo esBaseEnterpriseInfo = new EsBaseEnterpriseInfo();
BeanUtil.copyProperties(enterpriseInfo, esBaseEnterpriseInfo);
esBaseEnterpriseInfo.setSequenceNbr(enterpriseInfo.getSequenceNbr() + "");
esBaseEnterpriseInfo.setEquipCategory(StatisticsDataUpdateService.castStrList2String(enterpriseInfo.getEquipCategory()));
List<TzBaseUnitLicence> unitLicences = licenceMapper.selectList(new LambdaQueryWrapper<TzBaseUnitLicence>()
.eq(TzBaseUnitLicence::getUnitCode, enterpriseInfo.getUseUnitCode())
.eq(TzBaseUnitLicence::getIsDelete, false));
......@@ -1465,6 +1466,10 @@ public class DataHandlerServiceImpl {
List<EsUserInfo> esUserInfos = tzsUserInfoPage.getRecords().stream().map(u -> {
EsUserInfo esUserInfo = new EsUserInfo();
BeanUtil.copyProperties(u, esUserInfo);
esUserInfo.setPost(StatisticsDataUpdateService.castStrList2String(u.getPost()));
esUserInfo.setNewPost(StatisticsDataUpdateService.castStrList2String(u.getNewPost()));
esUserInfo.setSubPost(StatisticsDataUpdateService.castStrList2String(u.getSubPost()));
esUserInfo.setEquipType(StatisticsDataUpdateService.castStrList2String(u.getEquipType()));
esUserInfo.setUnitType(useCodeEnterpriseMap.getOrDefault(u.getUnitCode(), new TzBaseEnterpriseInfo()).getUnitType());
esUserInfo.setSuperviseOrgName(useCodeEnterpriseMap.getOrDefault(u.getUnitCode(), new TzBaseEnterpriseInfo()).getSuperviseOrgName());
esUserInfo.setSuperviseOrgCode(useCodeEnterpriseMap.getOrDefault(u.getUnitCode(), new TzBaseEnterpriseInfo()).getSuperviseOrgCode());
......@@ -1483,6 +1488,8 @@ public class DataHandlerServiceImpl {
return permissions.stream().map(p -> {
EsUserInfo.License license = new EsUserInfo.License();
BeanUtil.copyProperties(p, license);
license.setPermissionItem(StatisticsDataUpdateService.castStrList2String(p.getPermissionItem()));
license.setJobItem(StatisticsDataUpdateService.castStrList2String(p.getJobItem()));
return license;
}).collect(Collectors.toList());
}
......@@ -1550,4 +1557,5 @@ public class DataHandlerServiceImpl {
private List<ESEquipmentInfo.TechParam> buildTechParamByEquList(String record, String equListCode) {
return StringUtils.isNotEmpty(equListCode) ? statisticsDataUpdateService.getTechParams(equListCode, record) : new ArrayList<>();
}
}
package com.yeejoin.amos.boot.module.jg.biz.statistics.service;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.module.common.api.dto.TechParamItem;
import com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo;
import com.yeejoin.amos.boot.module.common.biz.utils.TechParamUtil;
import com.yeejoin.amos.boot.module.jg.biz.edit.backup.TechParamsBackupService;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
......@@ -31,4 +33,36 @@ public class StatisticsDataUpdateService {
return techParams;
}
/**
* 判断字符串是否为合法的 JSON 格式
*/
public static boolean isJSONValid(String test) {
try {
JSON.parseArray(test);
return true;
} catch (Exception ex) {
return false;
}
}
public static String castList2String(List<String> posts){
return String.join(",", posts);
}
public static String castStrList2String(String jsonTypesStr){
if(!isNullOrEmpty(jsonTypesStr)){
if(isJSONValid(jsonTypesStr)){
List<String> posts = JSON.parseArray(jsonTypesStr, String.class);
return String.join(",", posts);
}
return jsonTypesStr;
}
return null;
}
public static boolean isNullOrEmpty(String str) {
return str == null || str.trim().isEmpty() || "null".equals(str);
}
}
......@@ -16,7 +16,7 @@ public enum CompanyAdvanceSearchEnum {
ADDRESS("详细地址", "address", TechnicalParameter.ParamType.STRING,"",null,null),
EXPIRYDATE("许可有效期", "expiryDate",TechnicalParameter.ParamType.DATE,"",null,null),
UNIT_TYPE("企业类型", "unitType",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitType",null,null),
REGULATORY_LABELS("企业等级", "regulatoryLabels",null,"",null,null),
REGULATORY_LABELS("企业等级", "regulatoryLabels",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}","QYBQ",null),
INDUSTRY_SUPERVISOR("行业主管部门", "industrySupervisor",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}","HYZGBM",null),
ITEM_CODE("许可项目", "itemCode",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryXK",null,null),
SUB_ITEM_CODE("许可子项目", "subItemCode",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryXK?type={type}",null,"itemCode"),
......
......@@ -20,7 +20,8 @@ public enum PersonAdvanceSearchEnum {
// REGULATORY_LABELS("资质状态", "regulatoryLabels",null,""),
CERT_TYPE("证书类型", "certType",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryCertType",null,null),
PERMISSION_LEVEL("证书级别", "permissionLevel",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryPermissionLevel",null,null),
JOB_ITEM("作业项目", "jobItem",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryZYXM?type={type}",null,"certType|permissionLevel"),
JOB_ITEM("作业项目", "jobItem",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryZYXM?type={type}",null,"certType"),
PERMISSION_ITEM("项目", "permissionItem",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryZYXM?type={type}",null,"permissionLevel"),
ISSUE_DATE("发证日期", "issueDate",TechnicalParameter.ParamType.DATE,"",null,null),
EDUCATION("学历", "education",null,"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData","XLLX",null),
ADDRESS("住址", "address",TechnicalParameter.ParamType.STRING,"",null,null),
......
......@@ -11,7 +11,7 @@
where parent_id = #{parentId}
</select>
<select id="queryEquCategory" resultType="com.alibaba.fastjson.JSONArray">
<select id="queryEquCategory" resultType="com.alibaba.fastjson.JSONObject">
SELECT
code AS value,
code AS key,
......
......@@ -15,6 +15,8 @@ import com.yeejoin.amos.boot.module.common.biz.utils.TechParamUtil;
import com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum;
import com.yeejoin.amos.boot.module.statistcs.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.statistcs.biz.utils.MinioUtils;
import com.yeejoin.amos.boot.module.statistcs.factory.DynamicQueryBuilder;
import com.yeejoin.amos.boot.module.statistcs.factory.EnhancedDynamicQueryBuilder;
import com.yeejoin.amos.boot.module.statistics.api.enums.*;
import com.yeejoin.amos.boot.module.statistics.api.mapper.TzsCustomFilterMapper;
import com.yeejoin.amos.boot.module.statistics.api.vo.EquipInfoVo;
......@@ -83,6 +85,14 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
private final String BUCKET_NAME = "upload";
private final String UPLOAD_PATH = "/tzs/excelTempFile";
private final List<String> equipHandleOtherFields = Arrays.asList("techParam", "paramRange", "NEXT_INSPECT_DATE", "IS_SUPERVISORY_CODE", "USC_DATE", "createDate");
private final List<String> companyHandleOtherFields = Arrays.asList("itemCode", "subItemCode", "permitStatus", "equipCategory", "regulatoryLabels", "unitType");
private final List<String> personHandleOtherFields = Arrays.asList("newPost", "subPost", "certNo", "expiryDate", "certType", "permissionLevel", "jobItem", "permissionItem", "issueDate", "equipType", "unitType");
private final String or = "or";
private final String and = "and";
@Autowired
EquipmentCategoryMapper equipmentCategoryMapper;
......@@ -148,9 +158,9 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
public JSONArray queryAdvancedSearch(String type) {
JSONArray all = new JSONArray();
if("equip".equals(type)) {
if ("equip".equals(type)) {
all = EquipAdvanceSearchEnum.getAll();
}else if("company".equals(type)){
} else if ("company".equals(type)) {
all = CompanyAdvanceSearchEnum.getAll();
} else if ("person".equals(type)) {
all = PersonAdvanceSearchEnum.getAll();
......@@ -215,7 +225,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
boolMust.must(QueryBuilders.existsQuery(field));
TermsQueryBuilder termsQuery = QueryBuilders.termsQuery(field, (JSONArray) v);
boolMust.must(termsQuery);
} else if (k.equals("certNo") || k.equals("expiryDate") || k.equals("permissionLevel") || k.equals("certType") || k.equals("jobItem") || k.equals("issueDate")) {
} else if (k.equals("certNo") || k.equals("expiryDate") || k.equals("permissionLevel") || k.equals("certType") || k.equals("jobItem") || k.equals("permissionItem")) {
String path = "licenses";
((JSONArray) v).forEach(item -> {
String nestedField = path + "." + k;
......@@ -244,7 +254,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
// 临期:小于等于当前日期加上30天
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lte(LocalDate.now().plusDays(30).format(formatter))),
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lte(LocalDate.now().plusDays(30).format(formatter)).gte(LocalDate.now().format(formatter))),
ScoreMode.Avg
);
boolMust.must(nestedQuery);
......@@ -265,13 +275,20 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
);
boolMust.mustNot(nestedQuery);
}
} else if (k.equals("certType") || k.equals("permissionLevel") || k.equals("jobItem")) {
} else if (k.equals("certType") || k.equals("permissionLevel")) {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery(nestedField, (JSONArray) v)),
ScoreMode.Avg
);
boolMust.must(nestedQuery);
} else {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.wildcardQuery(nestedField, "*" + item + "*")),
ScoreMode.Avg
);
boolMust.should(nestedQuery);
}
});
} else if (k.equals("issueDate")) {
......@@ -280,23 +297,25 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
String endDate = DateUtils.convertDateToString(issueDates.getDate(1), DateUtils.DATE_PATTERN);
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
"licenses",
QueryBuilders.rangeQuery("issueDate").gte(startDate).lte(endDate),
QueryBuilders.rangeQuery(k).gte(startDate).lte(endDate),
ScoreMode.Avg
);
boolMust.filter(nestedQuery);
}
} else {
//todo 高级筛选
}
}
});
} else {
JSONArray leftGroup = filterParams.getJSONArray("group1");
JSONArray rightGroup = filterParams.getJSONArray("group2");
Boolean isOrGroup = or.equals(filterParams.getString("groupAndOr")) ? Boolean.TRUE : Boolean.FALSE;
handleAdvancedFilter(boolMust, leftGroup, rightGroup, isOrGroup);
}
}
// 排序
if (!ObjectUtils.isEmpty(filter.get("sort"))) {
JSONObject sort = JSONObject.parseObject(JSONObject.toJSONString(filter.get("sort")));
String field = sort.getString("filed");
String field = sort.getString("field");
SortOrder sortOrder = sort.getString("order").equals("desc") ? SortOrder.DESC : SortOrder.ASC;
FieldSortBuilder sortBuilder = SortBuilders.fieldSort(field + ".keyword").order(sortOrder);
builder.sort(sortBuilder);
......@@ -410,6 +429,11 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
});
} else {
JSONArray leftGroup = filterParams.getJSONArray("group1");
JSONArray rightGroup = filterParams.getJSONArray("group2");
Boolean isOrGroup = or.equals(filterParams.getString("groupAndOr")) ? Boolean.TRUE : Boolean.FALSE;
handleAdvancedFilter(boolMust, leftGroup, rightGroup, isOrGroup);
}
}
......@@ -417,7 +441,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
// 排序
if (!ObjectUtils.isEmpty(filter.get("sort"))) {
JSONObject sort = JSONObject.parseObject(JSONObject.toJSONString(filter.get("sort")));
String field = sort.getString("filed");
String field = sort.getString("field");
SortOrder sortOrder = sort.getString("order").equals("desc") ? SortOrder.DESC : SortOrder.ASC;
FieldSortBuilder sortBuilder = SortBuilders.fieldSort(field + ".keyword").order(sortOrder);
builder.sort(sortBuilder);
......@@ -484,7 +508,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
String paramKey = techParams.getString(0);
String condition = paramRangeJson.getString("condition");
Object value = paramRangeJson.getString("value");
getParamQuery(paramKey, condition, value, boolMust);
getParamQuery(paramKey, condition, value, false, boolMust, null, null);
}
} else if (!k.equals("paramRange")) {
if (v instanceof JSONArray) {
......@@ -500,7 +524,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
boolMust.filter(QueryBuilders.rangeQuery(finalField).lt(LocalDate.now().format(formatter)));
} else if (item.equals("near")) {
// 临期:小于等于当前日期加上30天
boolMust.filter(QueryBuilders.rangeQuery(finalField).lte(LocalDate.now().plusDays(30).format(formatter)));
boolMust.filter(QueryBuilders.rangeQuery(finalField).gte(LocalDate.now().format(formatter)).lte(LocalDate.now().plusDays(30).format(formatter)));
} else {
// 正常:大于当前日期加上30天
boolMust.filter(QueryBuilders.rangeQuery(finalField).gt(LocalDate.now().plusDays(30).format(formatter)));
......@@ -515,19 +539,17 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
boolMust.filter(QueryBuilders.rangeQuery(finalField).gt(LocalDate.now().minusYears(15).format(formatter)));
} else if (item.equals("10-15")) {
// 10-15年:小于当前日期减去15年,大于等于当前日期减去10年
boolMust.filter(QueryBuilders.rangeQuery(finalField).lt(LocalDate.now().minusYears(15).format(formatter)));
boolMust.filter(QueryBuilders.rangeQuery(finalField).gte(LocalDate.now().minusYears(10).format(formatter)));
boolMust.filter(QueryBuilders.rangeQuery(finalField).lt(LocalDate.now().minusYears(15).format(formatter)).gte(LocalDate.now().minusYears(10).format(formatter)));
} else if (item.equals("5-10")) {
// 5-10年:小于当前日期减去10年,大于等于当前日期减去5年
boolMust.filter(QueryBuilders.rangeQuery(finalField).lt(LocalDate.now().minusYears(10).format(formatter)));
boolMust.filter(QueryBuilders.rangeQuery(finalField).gte(LocalDate.now().minusYears(5).format(formatter)));
boolMust.filter(QueryBuilders.rangeQuery(finalField).lt(LocalDate.now().minusYears(10).format(formatter)).gte(LocalDate.now().minusYears(5).format(formatter)));
} else if (item.equals("0-5")) {
// 0-5年:小于当前日期减去5年
boolMust.filter(QueryBuilders.rangeQuery(finalField).lt(LocalDate.now().minusYears(5).format(formatter)));
}
});
} else if (k.equals("IS_SUPERVISORY_CODE")) {
String finalField = "IS_SUPERVISORY_CODE";
String finalField = k;
((JSONArray) v).forEach(item -> {
if (item.equals("1")) {
boolMust.must(QueryBuilders.existsQuery(finalField));
......@@ -553,14 +575,15 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
TermsQueryBuilder termsQuery = QueryBuilders.termsQuery(field, (JSONArray) v);
boolMust.must(termsQuery);
}
}
}
}
});
} else {
// todo 自定义筛选
JSONArray leftGroup = filterParams.getJSONArray("group1");
JSONArray rightGroup = filterParams.getJSONArray("group2");
Boolean isOrGroup = or.equals(filterParams.getString("groupAndOr")) ? Boolean.TRUE : Boolean.FALSE;
handleAdvancedFilter(boolMust, leftGroup, rightGroup, isOrGroup);
}
} else {
filterParams = null;
......@@ -569,7 +592,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
// 排序
if (!ObjectUtils.isEmpty(filter.get("sort"))) {
JSONObject sort = JSONObject.parseObject(JSONObject.toJSONString(filter.get("sort")));
String field = sort.getString("filed");
String field = sort.getString("field");
if (field.equals("EQU_LIST")) {
field = "EQU_LIST_CODE";
} else if (field.equals("EQU_CATEGORY")) {
......@@ -648,116 +671,592 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
result.put("statics", statics);
return result;
}
private void getParamQuery(String paramKey, String condition, Object value, BoolQueryBuilder boolMust) {
private void getParamQuery(String paramKey, String condition, Object value, Boolean isCustom, BoolQueryBuilder boolMust, EnhancedDynamicQueryBuilder builder, String andOr) {
String path = "techParams";
String nestedFieldKey = path + ".paramKey";
String nestedFieldValue = path + ".strValue";
String longEnd = ".longValue";
String stringEnd = ".strValue";
NestedQueryBuilder keyNestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery(nestedFieldKey, paramKey)),
ScoreMode.Avg
);
boolMust.must(keyNestedQuery);
if (isCustom) {
builder.add(keyNestedQuery, andOr);
} else {
boolMust.must(keyNestedQuery);
}
switch (condition) {
case "eq":
NestedQueryBuilder eqQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery(nestedFieldValue, value)),
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery(path + stringEnd, value)),
ScoreMode.Avg
);
boolMust.must(eqQuery);
if (isCustom) {
builder.add(eqQuery, andOr);
} else {
boolMust.must(eqQuery);
}
break;
case "neq":
boolMust.must(keyNestedQuery);
NestedQueryBuilder neqQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().mustNot(QueryBuilders.termsQuery(nestedFieldValue, value)),
QueryBuilders.boolQuery().mustNot(QueryBuilders.termsQuery(path + stringEnd, value)),
ScoreMode.Avg
);
boolMust.mustNot(neqQuery);
if (isCustom) {
builder.add(neqQuery, andOr);
} else {
boolMust.mustNot(neqQuery);
}
break;
case "like":
NestedQueryBuilder likeQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().should(QueryBuilders.wildcardQuery(nestedFieldValue, "*" + value + "*")),
QueryBuilders.boolQuery().must(QueryBuilders.wildcardQuery(path + stringEnd, "*" + value + "*")),
ScoreMode.Avg
);
boolMust.must(likeQuery);
if (isCustom) {
builder.add(likeQuery, andOr);
} else {
boolMust.must(likeQuery);
}
break;
case "notLike":
NestedQueryBuilder notLikeQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().should(QueryBuilders.wildcardQuery(nestedFieldValue, "*" + value + "*")),
QueryBuilders.boolQuery().must(QueryBuilders.wildcardQuery(path + stringEnd, "*" + value + "*")),
ScoreMode.Avg
);
boolMust.mustNot(notLikeQuery);
if (isCustom) {
builder.add(QueryBuilders.boolQuery().mustNot(notLikeQuery), andOr);
} else {
boolMust.mustNot(notLikeQuery);
}
break;
case "gt":
NestedQueryBuilder gtQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.rangeQuery(nestedFieldValue).gt(Double.parseDouble(value.toString()))),
QueryBuilders.rangeQuery(path + longEnd).gt(value.toString()),
ScoreMode.Avg
);
boolMust.must(gtQuery);
if (isCustom) {
builder.add(gtQuery, andOr);
} else {
boolMust.must(gtQuery);
}
break;
case "gte":
NestedQueryBuilder gteQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.rangeQuery(nestedFieldValue).gte(Double.parseDouble(value.toString()))),
QueryBuilders.boolQuery().must(QueryBuilders.rangeQuery(path + longEnd).gte(value.toString())),
ScoreMode.Avg
);
boolMust.must(gteQuery);
if (isCustom) {
builder.add(gteQuery, andOr);
} else {
boolMust.must(gteQuery);
}
break;
case "lt":
NestedQueryBuilder ltQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.rangeQuery(nestedFieldValue).lt(Double.parseDouble(value.toString()))),
QueryBuilders.boolQuery().must(QueryBuilders.rangeQuery(path + longEnd).lt(value.toString())),
ScoreMode.Avg
);
boolMust.must(ltQuery);
if (isCustom) {
builder.add(ltQuery, andOr);
} else {
boolMust.must(ltQuery);
}
break;
case "lte":
NestedQueryBuilder lteQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.rangeQuery(nestedFieldValue).lte(Double.parseDouble(value.toString()))),
QueryBuilders.boolQuery().must(QueryBuilders.rangeQuery(path + longEnd).lte(value.toString())),
ScoreMode.Avg
);
boolMust.must(lteQuery);
if (isCustom) {
builder.add(lteQuery, andOr);
} else {
boolMust.must(lteQuery);
}
break;
case "between":
JSONArray btValues = (JSONArray) value;
NestedQueryBuilder betweenQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.rangeQuery(nestedFieldValue).gte(Double.parseDouble(btValues.get(0).toString())).lte(Double.parseDouble(btValues.get(1).toString()))),
QueryBuilders.boolQuery().must(QueryBuilders.rangeQuery(path + longEnd).gte(Double.parseDouble(btValues.get(0).toString())).lte(Double.parseDouble(btValues.get(1).toString()))),
ScoreMode.Avg
);
boolMust.must(betweenQuery);
if (isCustom) {
builder.add(betweenQuery, andOr);
} else {
boolMust.must(betweenQuery);
}
break;
case "in":
JSONArray inValues = (JSONArray) value;
NestedQueryBuilder inQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery(nestedFieldValue, inValues)),
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery(path + stringEnd, inValues)),
ScoreMode.Avg
);
boolMust.must(inQuery);
if (isCustom) {
builder.add(inQuery, andOr);
} else {
boolMust.must(inQuery);
}
break;
case "notIn":
JSONArray notInValues = (JSONArray) value;
NestedQueryBuilder notInQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery(nestedFieldValue, notInValues)),
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery(path + stringEnd, notInValues)),
ScoreMode.Avg
);
boolMust.mustNot(notInQuery);
if (isCustom) {
builder.add(QueryBuilders.boolQuery().mustNot(notInQuery), andOr);
} else {
boolMust.mustNot(notInQuery);
}
break;
}
}
// 处理高级筛选条件
private void handleAdvancedFilter(BoolQueryBuilder boolMust, JSONArray leftGroup, JSONArray rightGroup, Boolean isOrGroup) {
DynamicQueryBuilder mainBuilder = new DynamicQueryBuilder();
EnhancedDynamicQueryBuilder leftBuilder = new EnhancedDynamicQueryBuilder();
if (!ObjectUtils.isEmpty(leftGroup)) {
// 处理左侧分组
JSONObject leftTechParam = new JSONObject();
JSONObject leftParamRange = new JSONObject();
JSONArray leftGroupList = new JSONArray();
// 剥离计数参数
getTechParam(leftGroup, leftGroupList, leftTechParam, leftParamRange);
// 如果技术参数分组不为空,添加技术参数筛选条件到左侧筛选条件中
if (!ObjectUtils.isEmpty(leftTechParam) && !ObjectUtils.isEmpty(leftParamRange)) {
addTechParam(leftTechParam, leftParamRange, leftBuilder);
}
// 非计数参数处理
groupHandler(leftGroupList, leftBuilder);
// 添加左侧筛选条件到最终筛选条件中
mainBuilder.and(leftBuilder.build());
}
if (!ObjectUtils.isEmpty(rightGroup)) {
// 处理右侧分组
EnhancedDynamicQueryBuilder rightBuilder = new EnhancedDynamicQueryBuilder();
JSONObject rightTechParam = new JSONObject();
JSONObject rightParamRange = new JSONObject();
JSONArray rightGroupList = new JSONArray();
// 剥离计数参数
getTechParam(rightGroup, rightGroupList, rightTechParam, rightParamRange);
// 如果技术参数分组不为空,添加技术参数筛选条件到左侧筛选条件中
if (!ObjectUtils.isEmpty(rightTechParam) && !ObjectUtils.isEmpty(rightParamRange)) {
addTechParam(rightTechParam, rightParamRange, rightBuilder);
}
// 非计数参数处理
groupHandler(rightGroupList, rightBuilder);
// 添加右侧筛选条件到最终筛选条件中
if (isOrGroup) {
mainBuilder.or(rightBuilder.build());
} else {
mainBuilder.and(rightBuilder.build());
}
}
// 组装最终筛选条件
boolMust.must(mainBuilder.build());
}
private void addTechParam(JSONObject techParam, JSONObject paramRange, EnhancedDynamicQueryBuilder builder) {
String field = techParam.getString("value");
String itemCondition = paramRange.getString("itemCondition");
Object value = paramRange.get("value");
String andOr = paramRange.getString("andOr");
getParamQuery(field, itemCondition, value, true, null, builder, andOr);
}
private void groupHandler(JSONArray group, EnhancedDynamicQueryBuilder builder) {
for (Object object : group) {
JSONObject itemObj = JSONObject.parseObject(JSONObject.toJSONString(object));
String field = itemObj.getString("field");
String itemCondition = itemObj.getString("itemCondition");
Object value = itemObj.get("value");
String andOr = itemObj.getString("andOr");
// 组装查询条件
getItemQueryNew(field, itemCondition, value, andOr, builder);
}
}
private void getTechParam(JSONArray group, JSONArray resultGroup, JSONObject techParam, JSONObject paramRange) {
// 如果只有技术参数或者只有参数范围,则舍弃对应的分组
group.forEach(item -> {
JSONObject itemObj = JSONObject.parseObject(JSONObject.toJSONString(item));
if (itemObj.containsKey("field") && itemObj.containsKey("value")) {
if (itemObj.getString("field").equals("techParam")) {
techParam.putAll(itemObj);
} else if (itemObj.getString("field").equals("paramRange")) {
paramRange.putAll(itemObj);
} else {
resultGroup.add(itemObj);
}
}
});
}
private void getItemQueryNew(String field, String itemCondition, Object value, String isOr, EnhancedDynamicQueryBuilder builder) {
// 如果包含需要特殊处理的字段,则调用对应的处理方法,否则调用通用处理方法
if (equipHandleOtherFields.contains(field) || companyHandleOtherFields.contains(field) || personHandleOtherFields.contains(field)) {
handleOtherField(field, itemCondition, value, isOr, builder);
} else {
switch (itemCondition) {
case "eq":
builder.add(QueryBuilders.termQuery(field, value), isOr);
break;
case "neq":
builder.add(QueryBuilders.boolQuery().mustNot(QueryBuilders.termQuery(field, value)), isOr);
break;
case "like":
builder.add(QueryBuilders.boolQuery().must(QueryBuilders.wildcardQuery(field, "*" + value + "*")), isOr);
break;
case "notLike":
builder.add(QueryBuilders.boolQuery().mustNot(QueryBuilders.wildcardQuery(field, "*" + value + "*")), isOr);
break;
case "gt":
builder.add(QueryBuilders.rangeQuery(field).gt(value.toString()), isOr);
break;
case "gte":
builder.add(QueryBuilders.rangeQuery(field).gte(value.toString()), isOr);
break;
case "lt":
builder.add(QueryBuilders.rangeQuery(field).lt(value.toString()), isOr);
break;
case "lte":
builder.add(QueryBuilders.rangeQuery(field).lte(value.toString()), isOr);
break;
case "between":
JSONArray btValues = (JSONArray) value;
builder.add(QueryBuilders.rangeQuery(field).gte(Double.parseDouble(btValues.get(0).toString())).lte(Double.parseDouble(btValues.get(1).toString())), isOr);
break;
case "in":
JSONArray inValues = (JSONArray) value;
builder.add(QueryBuilders.termsQuery(field, inValues), isOr);
break;
case "notIn":
JSONArray notInValues = (JSONArray) value;
builder.add(QueryBuilders.boolQuery().mustNot(QueryBuilders.termsQuery(field, notInValues)), isOr);
break;
}
}
}
// 特殊处理字段
private void handleOtherField(String field, String itemCondition, Object value, String isOr, EnhancedDynamicQueryBuilder builder) {
if (equipHandleOtherFields.contains(field)) {
equipFieldHandle(field, itemCondition, value, isOr, builder);
} else if (companyHandleOtherFields.contains(field)) {
companyFieldHandle(field, itemCondition, value, isOr, builder);
} else if (personHandleOtherFields.contains(field)) {
personFieldHandle(field, itemCondition, value, isOr, builder);
}
}
private void personFieldHandle(String field, String itemCondition, Object value, String isOr, EnhancedDynamicQueryBuilder builder) {
if (field.equals("newPost") || field.equals("subPost") || field.equals("equipType") || field.equals("unitType")) {
if (itemCondition.equals("eq")) {
builder.add(QueryBuilders.termQuery(field + ".keyword", value), isOr);
} else if (itemCondition.equals("in")) {
builder.add(QueryBuilders.wildcardQuery(field + ".keyword", "*" + value + "*"), isOr);
} else {
builder.add(QueryBuilders.boolQuery().mustNot(QueryBuilders.wildcardQuery(field + ".keyword", "*" + value + "*")), isOr);
}
} else {
String path = "licenses";
String nestedField = path + "." + field;
// 根据证书编号判断有无资质
if (field.equals("certNo")) {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.existsQuery(nestedField),
ScoreMode.Avg
);
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
builder.add(value.equals("1") ? nestedQuery : QueryBuilders.boolQuery().mustNot(nestedQuery), isOr);
} else {
builder.add(value.equals("1") ? QueryBuilders.boolQuery().mustNot(nestedQuery) : nestedQuery, isOr);
}
} else if (field.equals("expiryDate")) {
if (value.equals("overdue")) {
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lt(LocalDate.now().format(formatter))),
ScoreMode.Avg
);
builder.add(nestedQuery, isOr);
} else {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).gte(LocalDate.now().format(formatter))),
ScoreMode.Avg
);
builder.add(nestedQuery, isOr);
}
} else if (value.equals("near")) {
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lte(LocalDate.now().plusDays(30).format(formatter)).gte(LocalDate.now().format(formatter))),
ScoreMode.Avg
);
builder.add(nestedQuery, isOr);
} else {
NestedQueryBuilder overdueNestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lt(LocalDate.now().format(formatter))),
ScoreMode.Avg
);
NestedQueryBuilder normalNestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).gt(LocalDate.now().plusDays(30).format(formatter))),
ScoreMode.Avg
);
NestedQueryBuilder noLicensesNestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.existsQuery(nestedField),
ScoreMode.Avg
);
builder.add(overdueNestedQuery, or);
builder.add(normalNestedQuery, or);
builder.add(noLicensesNestedQuery, or);
}
} else if (value.equals("normal")) {
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).gt(LocalDate.now().plusDays(30).format(formatter))),
ScoreMode.Avg
);
builder.add(nestedQuery, isOr);
} else {
NestedQueryBuilder elseNestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lte(LocalDate.now().plusDays(30).format(formatter))),
ScoreMode.Avg
);
NestedQueryBuilder noLicensesNestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.existsQuery(nestedField),
ScoreMode.Avg
);
builder.add(elseNestedQuery, or);
builder.add(noLicensesNestedQuery, or);
}
} else {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.existsQuery(nestedField),
ScoreMode.Avg
);
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
builder.add(nestedQuery, isOr);
} else {
builder.add(QueryBuilders.boolQuery().mustNot(nestedQuery), isOr);
}
}
} else {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.wildcardQuery(nestedField, "*" + value + "*"),
ScoreMode.Avg
);
if (itemCondition.equals("eq")) {
NestedQueryBuilder eqNestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.termQuery(nestedField, value),
ScoreMode.Avg
);
builder.add(eqNestedQuery, isOr);
} else if (itemCondition.equals("in")) {
builder.add(nestedQuery, isOr);
} else {
builder.add(QueryBuilders.boolQuery().mustNot(nestedQuery), isOr);
}
}
}
}
private void companyFieldHandle(String field, String itemCondition, Object value, String isOr, EnhancedDynamicQueryBuilder builder) {
if (field.equals("itemCode") || field.equals("subItemCode") || field.equals("permitStatus")) {
String path = "licenses";
String nestedField = path + "." + (field.equals("permitStatus") ? "expiryDate" : field + ".keyword");
if (field.equals("permitStatus")) {
if (value.equals("overdue")) {
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lt(LocalDate.now().format(formatter))),
ScoreMode.Avg
);
builder.add(QueryBuilders.boolQuery().must(nestedQuery), isOr);
} else {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).gte(LocalDate.now().format(formatter))),
ScoreMode.Avg
);
builder.add(QueryBuilders.boolQuery().must(nestedQuery), isOr);
}
} else if (value.equals("near")) {
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lte(LocalDate.now().plusDays(30).format(formatter)).gte(LocalDate.now().format(formatter))),
ScoreMode.Avg
);
builder.add(QueryBuilders.boolQuery().must(nestedQuery), isOr);
} else {
NestedQueryBuilder overdueNestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lt(LocalDate.now().format(formatter))),
ScoreMode.Avg
);
builder.add(QueryBuilders.boolQuery().must(overdueNestedQuery), or);
NestedQueryBuilder normalNestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).gt(LocalDate.now().plusDays(30).format(formatter))),
ScoreMode.Avg
);
builder.add(QueryBuilders.boolQuery().must(normalNestedQuery), or);
}
} else if (value.equals("normal")) {
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).gt(LocalDate.now().plusDays(30).format(formatter))),
ScoreMode.Avg
);
builder.add(QueryBuilders.boolQuery().must(nestedQuery), isOr);
} else {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(nestedField).lte(LocalDate.now().plusDays(30).format(formatter))),
ScoreMode.Avg
);
builder.add(QueryBuilders.boolQuery().must(nestedQuery), isOr);
}
}
} else {
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
// 创建嵌套查询
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.termsQuery(nestedField, value),
ScoreMode.Avg
);
builder.add(QueryBuilders.boolQuery().must(nestedQuery), isOr);
} else {
NestedQueryBuilder nestedQuery = QueryBuilders.nestedQuery(
path,
QueryBuilders.termsQuery(nestedField, value),
ScoreMode.Avg
);
builder.add(QueryBuilders.boolQuery().mustNot(nestedQuery), isOr);
}
}
} else {
if (itemCondition.equals("eq")) {
builder.add(QueryBuilders.termQuery(field + ".keyword", value), isOr);
} else if (itemCondition.equals("in")) {
builder.add(QueryBuilders.wildcardQuery(field + ".keyword", "*" + value + "*"), isOr);
} else {
builder.add(QueryBuilders.boolQuery().mustNot(QueryBuilders.wildcardQuery(field + ".keyword", "*" + value + "*")), isOr);
}
}
}
private void equipFieldHandle(String field, String itemCondition, Object value, String isOr, EnhancedDynamicQueryBuilder builder) {
if (field.equals("NEXT_INSPECT_DATE")) {
if (value.equals("overdue")) {
// 超期:小于当前日期
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
builder.add(QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(field).lt(LocalDate.now().format(formatter))), isOr);
} else {
builder.add(QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(field).gt(LocalDate.now().format(formatter))), isOr);
}
} else if (value.equals("near")) {
// 临期:小于等于当前日期加上30天
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
builder.add(QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(field).gte(LocalDate.now().format(formatter)).lte(LocalDate.now().plusDays(30).format(formatter))), isOr);
} else {
builder.add(QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(field).lt(LocalDate.now().format(formatter))), or);
builder.add(QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(field).gt(LocalDate.now().plusDays(30).format(formatter))), or);
}
} else {
// 正常:大于当前日期加上30天
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
builder.add(QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(field).gt(LocalDate.now().plusDays(30).format(formatter))), isOr);
} else {
builder.add(QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery(field).lt(LocalDate.now().plusDays(30).format(formatter))), isOr);
}
}
} else if (field.equals("IS_SUPERVISORY_CODE")) {
if (value.equals("1")) {
builder.add(QueryBuilders.boolQuery().must(QueryBuilders.existsQuery(field)).mustNot(QueryBuilders.termsQuery(field, "null")), isOr);
} else {
builder.add(QueryBuilders.boolQuery().mustNot(QueryBuilders.existsQuery(field)), isOr);
}
} else if (field.equals("USC_DATE")) {
if (value.equals("15")) {
// 15年以上:大于当前日期减去15年
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
builder.add(QueryBuilders.rangeQuery(field).gt(LocalDate.now().minusYears(15).format(formatter)), isOr);
} else {
builder.add(QueryBuilders.rangeQuery(field).lte(LocalDate.now().minusYears(15).format(formatter)), isOr);
}
} else if (value.equals("10-15")) {
// 10-15年:小于当前日期减去15年,大于等于当前日期减去10年
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
builder.add(QueryBuilders.rangeQuery(field).lt(LocalDate.now().minusYears(15).format(formatter)).gte(LocalDate.now().minusYears(10).format(formatter)), isOr);
} else {
builder.add(QueryBuilders.rangeQuery(field).gte(LocalDate.now().minusYears(15).format(formatter)), or);
builder.add(QueryBuilders.rangeQuery(field).lte(LocalDate.now().minusYears(10).format(formatter)), or);
}
} else if (value.equals("5-10")) {
// 5-10年:小于当前日期减去10年,大于等于当前日期减去5年
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
builder.add(QueryBuilders.rangeQuery(field).lt(LocalDate.now().minusYears(10).format(formatter)).gte(LocalDate.now().minusYears(5).format(formatter)), isOr);
} else {
builder.add(QueryBuilders.rangeQuery(field).gte(LocalDate.now().minusYears(10).format(formatter)), or);
builder.add(QueryBuilders.rangeQuery(field).lte(LocalDate.now().minusYears(5).format(formatter)), or);
}
} else if (value.equals("0-5")) {
// 0-5年:小于当前日期减去5年
if (itemCondition.equals("eq") || itemCondition.equals("in")) {
builder.add(QueryBuilders.rangeQuery(field).lt(LocalDate.now().minusYears(5).format(formatter)), isOr);
} else {
builder.add(QueryBuilders.rangeQuery(field).gte(LocalDate.now().minusYears(5).format(formatter)), isOr);
}
}
} else if (field.equals("createDate")) {
JSONArray createDates = (JSONArray) value;
String startDate = DateUtils.convertDateToString(createDates.getDate(0), DateUtils.DATE_TIME_PATTERN);
String endDate = DateUtils.convertDateToString(createDates.getDate(1), DateUtils.DATE_TIME_PATTERN);
builder.add(QueryBuilders.rangeQuery("createDate").gte(startDate.replace(" ", "T")).lte(endDate.replace(" ", "T")), isOr);
}
}
public JSONArray queryUnitType() {
return UnitTypeEnum.getAll();
}
......@@ -779,15 +1278,15 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
JSONArray permitStatusData = new JSONArray();
for (int i = 0; i < 3; i++) {
JSONObject object = new JSONObject();
if(0==i){
if (0 == i) {
object.put("key", "overdue");
object.put("value", "overdue");
object.put("label", "超期");
}else if(1==i){
} else if (1 == i) {
object.put("key", "near");
object.put("value", "near");
object.put("label", "临期");
}else{
} else {
object.put("key", "normal");
object.put("value", "normal");
object.put("label", "正常");
......@@ -815,21 +1314,21 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
JSONObject result = new JSONObject();
//资质状态
JSONArray permissionStatus = new JSONArray();
for(int i=0;i<3;i++){
for (int i = 0; i < 3; i++) {
JSONObject object = new JSONObject();
if(0==i){
if (0 == i) {
object.put("key", "noLicenses");
object.put("value", "noLicenses");
object.put("label", "无资质要求");
}else if(1==i){
} else if (1 == i) {
object.put("key", "overdue");
object.put("value", "overdue");
object.put("label", "资质超期");
}else if(2==i){
} else if (2 == i) {
object.put("key", "near");
object.put("value", "near");
object.put("label", "资质临期");
}else {
} else {
object.put("key", "normal");
object.put("value", "normal");
object.put("label", "正常");
......@@ -840,7 +1339,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
//证书类型
List<DictionarieValueModel> certType = Systemctl.dictionarieClient.dictValues("CERT_TYPE").getResult();
JSONArray certTypeArray = new JSONArray();
for(int i=0;i<certType.size();i++){
for (int i = 0; i < certType.size(); i++) {
JSONObject object = new JSONObject();
object.put("key", certType.get(i).getDictDataKey());
object.put("value", certType.get(i).getDictDataKey());
......@@ -852,14 +1351,14 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
List<DictionarieValueModel> RYJB_JC = Systemctl.dictionarieClient.dictValues("RYJB_JC").getResult();
List<DictionarieValueModel> RYJB_JY = Systemctl.dictionarieClient.dictValues("RYJB_JY").getResult();
JSONArray permissionLevelArray = new JSONArray();
for(int i=0;i<RYJB_JC.size();i++){
for (int i = 0; i < RYJB_JC.size(); i++) {
JSONObject object = new JSONObject();
object.put("key", RYJB_JC.get(i).getDictDataKey());
object.put("value", RYJB_JC.get(i).getDictDataKey());
object.put("label", RYJB_JC.get(i).getDictDataValue());
permissionLevelArray.add(object);
}
for(int i=0;i<RYJB_JY.size();i++){
for (int i = 0; i < RYJB_JY.size(); i++) {
JSONObject object = new JSONObject();
object.put("key", RYJB_JY.get(i).getDictDataKey());
object.put("value", RYJB_JY.get(i).getDictDataKey());
......@@ -872,7 +1371,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
//监管设备类型
List<EquipmentCategoryDto> equipmentCategoryDtos = equipmentCategoryMapper.selectClassify();
JSONArray equipCategoryData = new JSONArray();
for(int i=0;i<equipmentCategoryDtos.size();i++){
for (int i = 0; i < equipmentCategoryDtos.size(); i++) {
JSONObject object = new JSONObject();
object.put("key", equipmentCategoryDtos.get(i).getCode());
object.put("value", equipmentCategoryDtos.get(i).getCode());
......@@ -993,7 +1492,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
public JSONArray queryZYXM(String type) {
JSONArray result = new JSONArray();
if("特种设备安全管理和作业人员证".equals(type)){
if ("特种设备安全管理和作业人员证".equals(type)) {
List<DictionarieValueModel> certType = Systemctl.dictionarieClient.dictValues("JOB_ITEM").getResult();
for (DictionarieValueModel certTypeModel : certType) {
JSONObject jsonObject = new JSONObject();
......@@ -1002,8 +1501,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
jsonObject.put("label", certTypeModel.getDictDataValue());
result.add(jsonObject);
}
}else {
List<DictionarieValueModel> certType = Systemctl.dictionarieClient.dictValues("ZZXM_"+type).getResult();
} else {
List<DictionarieValueModel> certType = Systemctl.dictionarieClient.dictValues("ZZXM_" + type).getResult();
for (DictionarieValueModel certTypeModel : certType) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("key", certTypeModel.getDictDataKey());
......@@ -1019,19 +1518,19 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
SearchRequest searchRequest = new SearchRequest("idx_biz_enterprise_info");
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
boolQueryBuilder.must(QueryBuilders.wildcardQuery("superviseOrgCode.keyword", QueryParser.escape(orgCode) + "*"));
boolQueryBuilder.must(QueryBuilders.wildcardQuery("superviseOrgCode.keyword", QueryParser.escape(orgCode) + "*"));
searchSourceBuilder.query(boolQueryBuilder);
searchRequest.source(searchSourceBuilder);
JSONArray result = new JSONArray();
try {
SearchResponse searchResponse = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : searchResponse.getHits().getHits()) {
for (SearchHit hit : searchResponse.getHits().getHits()) {
JSONObject jsonObject = ((JSONObject) JSONObject.toJSON(hit)).getJSONObject("sourceAsMap");
JSONObject dto = new JSONObject();
dto.put("key",jsonObject.getString("useCode"));
dto.put("value",jsonObject.getString("useCode"));
dto.put("label",jsonObject.getString("useUnit"));
dto.put("key", jsonObject.getString("useCode"));
dto.put("value", jsonObject.getString("useCode"));
dto.put("label", jsonObject.getString("useUnit"));
result.add(dto);
}
} catch (IOException e) {
......@@ -1044,7 +1543,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
public JSONArray queryEquipList() {
List<EquipmentCategoryDto> equipmentCategoryDtos = equipmentCategoryMapper.selectClassify();
JSONArray equipCategoryData = new JSONArray();
for(int i=0;i<equipmentCategoryDtos.size();i++){
for (int i = 0; i < equipmentCategoryDtos.size(); i++) {
JSONObject object = new JSONObject();
object.put("key", equipmentCategoryDtos.get(i).getCode());
object.put("value", equipmentCategoryDtos.get(i).getCode());
......@@ -1055,12 +1554,12 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
public JSONArray queryEquCategory(String type) {
JSONArray result = tzsCustomFilterMapper.queryEquCategory(type,"EQU_CATEGORY");
JSONArray result = tzsCustomFilterMapper.queryEquCategory(type, "EQU_CATEGORY");
return result;
}
public JSONArray queryEquDefine(String type) {
JSONArray result = tzsCustomFilterMapper.queryEquCategory(type,"EQU_DEFINE");
JSONArray result = tzsCustomFilterMapper.queryEquCategory(type, "EQU_DEFINE");
return result;
}
......@@ -1097,7 +1596,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
//证书类型
List<DictionarieValueModel> certType = Systemctl.dictionarieClient.dictValues("CERT_TYPE").getResult();
JSONArray certTypeArray = new JSONArray();
for(int i=0;i<certType.size();i++){
for (int i = 0; i < certType.size(); i++) {
JSONObject object = new JSONObject();
object.put("key", certType.get(i).getDictDataKey());
object.put("value", certType.get(i).getDictDataKey());
......@@ -1112,14 +1611,14 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
List<DictionarieValueModel> RYJB_JC = Systemctl.dictionarieClient.dictValues("RYJB_JC").getResult();
List<DictionarieValueModel> RYJB_JY = Systemctl.dictionarieClient.dictValues("RYJB_JY").getResult();
JSONArray permissionLevelArray = new JSONArray();
for(int i=0;i<RYJB_JC.size();i++){
for (int i = 0; i < RYJB_JC.size(); i++) {
JSONObject object = new JSONObject();
object.put("key", RYJB_JC.get(i).getDictDataKey());
object.put("value", RYJB_JC.get(i).getDictDataKey());
object.put("label", RYJB_JC.get(i).getDictDataValue());
permissionLevelArray.add(object);
}
for(int i=0;i<RYJB_JY.size();i++){
for (int i = 0; i < RYJB_JY.size(); i++) {
JSONObject object = new JSONObject();
object.put("key", RYJB_JY.get(i).getDictDataKey());
object.put("value", RYJB_JY.get(i).getDictDataKey());
......
package com.yeejoin.amos.boot.module.statistcs.factory;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import java.util.ArrayList;
import java.util.List;
public class DynamicQueryBuilder {
private final List<QueryBuilder> shouldClauses = new ArrayList<>();
private final List<QueryBuilder> mustClauses = new ArrayList<>();
private final List<QueryBuilder> mustNotClauses = new ArrayList<>();
// 添加OR条件
public DynamicQueryBuilder or(QueryBuilder query) {
shouldClauses.add(query);
return this;
}
// 添加AND条件
public DynamicQueryBuilder and(QueryBuilder query) {
mustClauses.add(query);
return this;
}
// 添加NOT条件
public DynamicQueryBuilder not(QueryBuilder query) {
mustNotClauses.add(query);
return this;
}
// 构建最终查询
public BoolQueryBuilder build() {
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
if (!shouldClauses.isEmpty()) {
shouldClauses.forEach(boolQuery::should);
boolQuery.minimumShouldMatch(1);
}
mustClauses.forEach(boolQuery::must);
mustNotClauses.forEach(boolQuery::mustNot);
return boolQuery;
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.statistcs.factory;
import org.elasticsearch.index.query.*;
import java.util.*;
public class EnhancedDynamicQueryBuilder {
private final List<QueryBuilder> initialClauses = new ArrayList<>();
private String groupLogic; // "AND" 或 "OR"
private final List<QueryBuilder> mustClauses = new ArrayList<>();
private final List<QueryBuilder> shouldClauses = new ArrayList<>();
private final List<QueryBuilder> mustNotClauses = new ArrayList<>();
public EnhancedDynamicQueryBuilder() {
this("AND"); // 默认组间关系为AND
}
public EnhancedDynamicQueryBuilder(String groupLogic) {
this.groupLogic = groupLogic != null ? groupLogic : "AND";
}
/**
* 添加条件,自动处理第一个条件为null的情况
* @param query 查询条件
* @param logic 逻辑关系 (AND/OR/NOT),第一个条件可为null
*/
public EnhancedDynamicQueryBuilder add(QueryBuilder query, String logic) {
if (logic == null) {
if (isEmpty()) {
// 第一个条件,默认作为must条件
mustClauses.add(query);
} else {
// 后续条件未指定逻辑,使用组间默认逻辑
if ("OR".equalsIgnoreCase(groupLogic)) {
shouldClauses.add(query);
} else {
mustClauses.add(query);
}
}
} else {
switch (logic.toUpperCase()) {
case "AND":
mustClauses.add(query);
break;
case "OR":
shouldClauses.add(query);
break;
case "NOT":
mustNotClauses.add(query);
break;
default:
throw new IllegalArgumentException("Unsupported logic: " + logic);
}
}
return this;
}
public BoolQueryBuilder build() {
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
// 处理must条件
mustClauses.forEach(boolQuery::must);
// 处理should条件
if (!shouldClauses.isEmpty()) {
shouldClauses.forEach(boolQuery::should);
// 如果没有must条件,至少满足一个should
if (mustClauses.isEmpty()) {
boolQuery.minimumShouldMatch(1);
}
}
// 处理mustNot条件
mustNotClauses.forEach(boolQuery::mustNot);
return boolQuery;
}
private boolean isEmpty() {
return mustClauses.isEmpty() && shouldClauses.isEmpty() && mustNotClauses.isEmpty();
}
}
\ No newline at end of file
......@@ -202,4 +202,10 @@ public class TzBaseEnterpriseInfo extends BaseEntity {
@ApiModelProperty(value = "省内详细办公地址")
private String officeAddress;
/**
* 创建时间
*/
@TableField(value = "create_date")
private Date createDate;
}
......@@ -235,4 +235,10 @@ public class TzsUserInfo extends BaseEntity {
*/
@TableField(value = "transfer_out_time")
protected Date transferOutTime;
/**
* 创建时间
*/
@TableField(value = "create_date")
private Date createDate;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment