Commit bee59c90 authored by suhuiguang's avatar suhuiguang

refact(综合搜索):数据同步调整

1.技术参数由之前的按照设备种类过滤调整为按照设备种类、设备类别、设备品种、是否车用气瓶进行过滤
parent 5c9988b7
package com.yeejoin.amos.boot.biz.common.annotation; package com.yeejoin.amos.boot.biz.common.annotation;
import com.baomidou.mybatisplus.annotation.TableField;
import java.lang.annotation.*; import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
...@@ -23,18 +21,30 @@ public @interface TechnicalParameter { ...@@ -23,18 +21,30 @@ public @interface TechnicalParameter {
String unit() default ""; String unit() default "";
/** /**
* 设备类别code * 匹配条件-设备类别code
* @return 设备类别 * @return 设备类别
*/ */
String[] equCategory() default {}; String[] equCategory() default {};
/** /**
* 设备品种code,设备品种配置空时代表,全部都有 * 匹配条件-设备品种code,设备品种配置空时代表,全部都有
* @return 设备品种 * @return 设备品种
*/ */
String[] equDefine() default {}; String[] equDefine() default {};
/**
* 匹配条件-标签如车用气瓶、球罐
* @return 标签数组
*/
String[] tags() default {};
/**
* 匹配条件-设备类型下默认隐藏字段配置
* @return 在指定设备类型下需要的隐藏字段
*/
String[] ignoreCategoryConf() default {};
enum ParamType { enum ParamType {
STRING, INTEGER, FLOAT, BIG_DECIMAL, BOOLEAN, OBJECT, DATE STRING, INTEGER, FLOAT, BIG_DECIMAL, BOOLEAN, OBJECT, DATE
......
...@@ -17,77 +17,77 @@ import java.math.BigDecimal; ...@@ -17,77 +17,77 @@ import java.math.BigDecimal;
public class ElevatorTechParamDefine implements ITechParamDefine { public class ElevatorTechParamDefine implements ITechParamDefine {
@TechnicalParameter(key = "ratedSpeedUp", label = "额定速度(上行)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/s") @TechnicalParameter(key = "ratedSpeedUp", label = "额定速度(上行)", equCategory = {"3200", "3400"}, equDefine = {"3210", "3220", "3410", "3420"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m/s")
private BigDecimal ratedSpeedUp; private BigDecimal ratedSpeedUp;
@TechnicalParameter(key = "ratedSpeedDown", label = "额定速度(下行)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/s") @TechnicalParameter(key = "ratedSpeedDown", label = "额定速度(下行)", equCategory = {"3200", "3400"}, equDefine = {"3210", "3220", "3410", "3420"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m/s")
private BigDecimal ratedSpeedDown; private BigDecimal ratedSpeedDown;
@TechnicalParameter(key = "ratedLoadCapacity", label = "额定载重量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "kg") @TechnicalParameter(key = "ratedLoadCapacity", label = "额定载重量", equCategory = {"3100", "3200", "3400"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "kg")
private BigDecimal ratedLoadCapacity; private BigDecimal ratedLoadCapacity;
@TechnicalParameter(key = "liftingHeight", label = "提升高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m") @TechnicalParameter(key = "liftingHeight", label = "提升高度", equCategory = {"3300"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m")
private BigDecimal liftingHeight; private BigDecimal liftingHeight;
@TechnicalParameter(key = "deviceLevel", label = "层数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "层") @TechnicalParameter(key = "deviceLevel", label = "层数", equCategory = {"3100", "3200", "3400"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "层")
private BigDecimal deviceLevel; private BigDecimal deviceLevel;
@TechnicalParameter(key = "stand", label = "站数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "站") @TechnicalParameter(key = "stand", label = "站数", equCategory = {"3100", "3200", "3400"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "站")
private BigDecimal stand; private BigDecimal stand;
@TechnicalParameter(key = "numberDoors", label = "门数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "门数") @TechnicalParameter(key = "numberDoors", label = "门数", equCategory = {"3100", "3200", "3400"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "门数")
private BigDecimal numberDoors; private BigDecimal numberDoors;
@TechnicalParameter(key = "controlMode", label = "控制方式", type = TechnicalParameter.ParamType.STRING, dictCode = "DSXS") @TechnicalParameter(key = "controlMode", label = "控制方式", equCategory = {"3100", "3200", "3400"}, type = TechnicalParameter.ParamType.STRING, dictCode = "DSXS")
private String controlMode; private String controlMode;
@TechnicalParameter(key = "numberCylinders", label = "油缸数量", type = TechnicalParameter.ParamType.BIG_DECIMAL) @TechnicalParameter(key = "numberCylinders", label = "油缸数量", equCategory = {"3200", "3400"}, equDefine = {"3210", "3220", "3420"}, type = TechnicalParameter.ParamType.BIG_DECIMAL)
private BigDecimal numberCylinders; private BigDecimal numberCylinders;
@TechnicalParameter(key = "jackingType", label = "顶升方式", type = TechnicalParameter.ParamType.STRING, dictCode = "DSXS") @TechnicalParameter(key = "jackingType", label = "顶升方式", equCategory = {"3200", "3400"}, equDefine = {"3210", "3220", "3420"}, type = TechnicalParameter.ParamType.STRING, dictCode = "DSXS")
private String jackingType; private String jackingType;
@TechnicalParameter(key = "explosionproofGrade", label = "区域防爆等级", type = TechnicalParameter.ParamType.STRING, dictCode = "FBDJ") @TechnicalParameter(key = "explosionproofGrade", label = "区域防爆等级", equCategory = {"3400"}, equDefine = {"3410"}, type = TechnicalParameter.ParamType.STRING, dictCode = "FBDJ")
private String explosionproofGrade; private String explosionproofGrade;
@TechnicalParameter(key = "explosionproofSignComplete", label = "整机防爆标志", type = TechnicalParameter.ParamType.STRING) @TechnicalParameter(key = "explosionproofSignComplete", label = "整机防爆标志", equCategory = {"3400"}, equDefine = {"3410"}, type = TechnicalParameter.ParamType.STRING)
private String explosionproofSignComplete; private String explosionproofSignComplete;
@TechnicalParameter(key = "nominalSpeed", label = "名义速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/s") @TechnicalParameter(key = "nominalSpeed", label = "名义速度", equCategory = {"3300"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m/s")
private BigDecimal nominalSpeed; private BigDecimal nominalSpeed;
@TechnicalParameter(key = "nominalWidth", label = "名义宽度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm") @TechnicalParameter(key = "nominalWidth", label = "名义宽度", equCategory = {"3300"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "mm")
private BigDecimal nominalWidth; private BigDecimal nominalWidth;
@TechnicalParameter(key = "angleRoll", label = "倾斜角", type = TechnicalParameter.ParamType.BIG_DECIMAL) @TechnicalParameter(key = "angleRoll", label = "倾斜角", equCategory = {"3100", "3300"}, type = TechnicalParameter.ParamType.BIG_DECIMAL)
private BigDecimal angleRoll; private BigDecimal angleRoll;
@TechnicalParameter(key = "useSectionLength", label = "使用区段长度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m") @TechnicalParameter(key = "useSectionLength", label = "使用区段长度", equCategory = {"3300"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m")
private BigDecimal useSectionLength; private BigDecimal useSectionLength;
@TechnicalParameter(key = "conveyingCapacity", label = "输送能力", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "P/h") @TechnicalParameter(key = "conveyingCapacity", label = "输送能力", equCategory = {"3300"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "P/h")
private BigDecimal conveyingCapacity; private BigDecimal conveyingCapacity;
@TechnicalParameter(key = "doorPosition", label = "轿门位置", type = TechnicalParameter.ParamType.STRING) @TechnicalParameter(key = "doorPosition", label = "轿门位置", equCategory = {"3100"}, type = TechnicalParameter.ParamType.STRING)
private String doorPosition; private String doorPosition;
@TechnicalParameter(key = "ratedSpeed", label = "额定速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m/s") @TechnicalParameter(key = "ratedSpeed", label = "额定速度", equCategory = {"3100", "3400"}, equDefine = {"3110", "3120", "3130", "3430"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m/s")
private BigDecimal ratedSpeed; private BigDecimal ratedSpeed;
} }
...@@ -17,47 +17,47 @@ import java.math.BigDecimal; ...@@ -17,47 +17,47 @@ import java.math.BigDecimal;
public class RidesTechParamDefine implements ITechParamDefine { public class RidesTechParamDefine implements ITechParamDefine {
@TechnicalParameter(key = "trackHeight", label = "轨道高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m") @TechnicalParameter(key = "trackHeight", label = "轨道高度", equCategory = {"6B00", "6300", "6200"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m")
private BigDecimal trackHeight; private BigDecimal trackHeight;
@TechnicalParameter(key = "runningSpeed", label = "运行速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "km/h (m/s)") @TechnicalParameter(key = "runningSpeed", label = "运行速度", equCategory = {"6B00", "6300", "6100", "6700", "6800", "6500", "6200", "6600", "6400", "6E00", "6D00"}, equDefine = {"6D10", "6D20", "6D40", "6E20"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "km/h (m/s)")
private BigDecimal runningSpeed; private BigDecimal runningSpeed;
@TechnicalParameter(key = "numberOfPassengers", label = "乘坐人数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "人") @TechnicalParameter(key = "numberOfPassengers", label = "承载人数", equCategory = {"6B00", "6A00", "6300", "6900", "6100", "6700", "6800", "6500", "6200", "6600", "6400", "6E00", "6D00"}, equDefine = {"6E20", "6E30", "6D10", "6D40"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "人")
private BigDecimal numberOfPassengers; private BigDecimal numberOfPassengers;
@TechnicalParameter(key = "slideLength", label = "滑道长度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m") @TechnicalParameter(key = "slideLength", label = "滑索(道)长度", equCategory = {"6B00", "6E00"}, equDefine = {"6E20"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m")
private BigDecimal slideLength; private BigDecimal slideLength;
@TechnicalParameter(key = "operatingHeight", label = "运行高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m") @TechnicalParameter(key = "operatingHeight", label = "运行高度", equCategory = {"6500", "6E00", "6D00", "6D00"}, equDefine = {"6D10", "6D20", "6E10", "6E40"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m")
private BigDecimal operatingHeight; private BigDecimal operatingHeight;
@TechnicalParameter(key = "slideHeight", label = "蹦极绳长度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m") @TechnicalParameter(key = "slideHeight", label = "蹦极绳长度", equCategory = {"6E00"}, equDefine = {"6E10"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m")
private BigDecimal slideHeight; private BigDecimal slideHeight;
@TechnicalParameter(key = "rotaryDiameter", label = "回转直径", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m") @TechnicalParameter(key = "rotaryDiameter", label = "回转直径", equCategory = {"6100", "6700", "6500", "6600", "6400", "6E00"}, equDefine = {"6E30"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m")
private BigDecimal rotaryDiameter; private BigDecimal rotaryDiameter;
@TechnicalParameter(key = "unilateralSwingAngle", label = "单边摆角", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "°") @TechnicalParameter(key = "unilateralSwingAngle", label = "单边摆角", equCategory = {"6E00"}, equDefine = {"6E30"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "°")
private BigDecimal unilateralSwingAngle; private BigDecimal unilateralSwingAngle;
@TechnicalParameter(key = "numberOfVehicles", label = "车辆数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "个") @TechnicalParameter(key = "numberOfVehicles", label = "车辆数", equCategory = {"6A00"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "个")
private BigDecimal numberOfVehicles; private BigDecimal numberOfVehicles;
@TechnicalParameter(key = "dip", label = "倾角", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "°") @TechnicalParameter(key = "dip", label = "倾角", equCategory = {"6400"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "°")
private BigDecimal dip; private BigDecimal dip;
@TechnicalParameter(key = "equipmentHeight", label = "设备高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "m") @TechnicalParameter(key = "equipmentHeight", label = "设备高度", equCategory = {"6100"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "m")
private BigDecimal equipmentHeight; private BigDecimal equipmentHeight;
} }
...@@ -25,90 +25,85 @@ public class VehicleTechParamDefine implements ITechParamDefine { ...@@ -25,90 +25,85 @@ public class VehicleTechParamDefine implements ITechParamDefine {
private String engineNo; private String engineNo;
@TechnicalParameter(key = "liftingCapacity", label = "额定起重量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "Kg") @TechnicalParameter(key = "liftingCapacity", equCategory = "5100", label = "额定起重量", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "Kg")
private BigDecimal liftingCapacity; private BigDecimal liftingCapacity;
@TechnicalParameter(key = "transmissionMode", label = "传动方式", type = TechnicalParameter.ParamType.STRING) @TechnicalParameter(key = "transmissionMode", label = "传动方式", equCategory = "5100", type = TechnicalParameter.ParamType.STRING)
private String transmissionMode; private String transmissionMode;
@TechnicalParameter(key = "weight", label = "自重", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "Kg") @TechnicalParameter(key = "weight", label = "自重", equCategory = "5100", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "Kg")
private BigDecimal weight; private BigDecimal weight;
@TechnicalParameter(key = "powerMode", label = "动力方式", type = TechnicalParameter.ParamType.STRING) @TechnicalParameter(key = "powerMode", label = "动力方式", equCategory = "5100", type = TechnicalParameter.ParamType.STRING)
private String powerMode; private String powerMode;
@TechnicalParameter(key = "maxRunningSpeed", label = "最大运行速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "km/h") @TechnicalParameter(key = "maxRunningSpeed", label = "最大运行速度", equCategory = {"5100", "5200"}, type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "km/h")
private BigDecimal maxRunningSpeed; private BigDecimal maxRunningSpeed;
@TechnicalParameter(key = "maxLiftingHeight", label = "工作装置空载最大起升高度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm")
private BigDecimal maxLiftingHeight;
@TechnicalParameter(key = "gasGroup", label = "气体/粉尘组别(防爆)", type = TechnicalParameter.ParamType.STRING) @TechnicalParameter(key = "gasGroup", label = "气体/粉尘组别(防爆)", equCategory = "5100", type = TechnicalParameter.ParamType.STRING)
private String gasGroup; private String gasGroup;
@TechnicalParameter(key = "frameStructure", label = "车架结构", type = TechnicalParameter.ParamType.STRING) @TechnicalParameter(key = "frameStructure", label = "车架结构", equCategory = "5100", type = TechnicalParameter.ParamType.STRING)
private String frameStructure; private String frameStructure;
@TechnicalParameter(key = "drivingMode", label = "驾驶方式", type = TechnicalParameter.ParamType.STRING) @TechnicalParameter(key = "drivingMode", label = "驾驶方式", equCategory = "5100", type = TechnicalParameter.ParamType.STRING)
private String drivingMode; private String drivingMode;
@TechnicalParameter(key = "carryingIdlerMaxRunningSpeed", label = "空载最大运行速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "km/h") @TechnicalParameter(key = "protectGrade", label = "设备保护等级(防爆)", equCategory = "5100", type = TechnicalParameter.ParamType.STRING, dictCode = "FBDJ")
private BigDecimal carryingIdlerMaxRunningSpeed;
@TechnicalParameter(key = "protectGrade", label = "设备保护等级(防爆)", type = TechnicalParameter.ParamType.STRING, dictCode = "FBDJ")
private String protectGrade; private String protectGrade;
@TechnicalParameter(key = "temperatureGroup", label = "温度组别(防爆)", type = TechnicalParameter.ParamType.STRING) @TechnicalParameter(key = "temperatureGroup", label = "温度组别(防爆)", equCategory = "5100", type = TechnicalParameter.ParamType.STRING)
private String temperatureGroup; private String temperatureGroup;
@TechnicalParameter(key = "passengersNumber", label = "额定载客人数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "人") @TechnicalParameter(key = "passengersNumber", label = "额定载客人数", equCategory = "5200", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "人")
private BigDecimal passengersNumber; private BigDecimal passengersNumber;
@TechnicalParameter(key = "maxDrivingSlope", label = "最大行驶坡度", type = TechnicalParameter.ParamType.BIG_DECIMAL) @TechnicalParameter(key = "maxDrivingSlope", label = "最大行驶坡度", equCategory = "5200", type = TechnicalParameter.ParamType.BIG_DECIMAL)
private BigDecimal maxDrivingSlope; private BigDecimal maxDrivingSlope;
@TechnicalParameter(key = "vehicleMass", label = "整车整备质量", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "Kg") @TechnicalParameter(key = "vehicleMass", label = "整车整备质量", equCategory = "5200", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "Kg")
private BigDecimal vehicleMass; private BigDecimal vehicleMass;
@TechnicalParameter(key = "wheelBase", label = "轴距", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm") @TechnicalParameter(key = "wheelBase", label = "轴距", equCategory = "5200", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "mm")
private BigDecimal wheelBase; private BigDecimal wheelBase;
@TechnicalParameter(key = "trackWidthFront", label = "轮距(前)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm") @TechnicalParameter(key = "trackWidthFront", label = "轮距(前)", equCategory = "5200", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "mm")
private BigDecimal trackWidthFront; private BigDecimal trackWidthFront;
@TechnicalParameter(key = "trackWidthBehind", label = "轮距(后)", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "mm") @TechnicalParameter(key = "trackWidthBehind", label = "轮距(后)", equCategory = "5200", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "mm")
private BigDecimal trackWidthBehind; private BigDecimal trackWidthBehind;
@TechnicalParameter(key = "carsNumber", label = "观光列车车厢数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "节") @TechnicalParameter(key = "carsNumber", label = "观光列车车厢数", equCategory = "5200", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "节")
private BigDecimal carsNumber; private BigDecimal carsNumber;
@TechnicalParameter(key = "seatNumber", label = "观光列车每节车厢座位数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "个") @TechnicalParameter(key = "seatNumber", label = "观光列车每节车厢座位数", equCategory = "5200", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "个")
private BigDecimal seatNumber; private BigDecimal seatNumber;
@TechnicalParameter(key = "tractorSeatNumber", label = "观光列车牵引车头座位数", equCategory = "5200", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "个")
@TechnicalParameter(key = "tractorSeatNumber", label = "观光列车牵引车头座位数", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "个")
private BigDecimal tractorSeatNumber; private BigDecimal tractorSeatNumber;
@TechnicalParameter(key = "carryingIdlerMaxRunningSpeed", label = "空载最大运行速度", equCategory = "5100", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "km/h")
private BigDecimal carryingIdlerMaxRunningSpeed;
@TechnicalParameter(key = "maxLiftingHeight", label = "工作装置空载最大起升高度", equCategory = "5100", type = TechnicalParameter.ParamType.BIG_DECIMAL, unit = "mm")
private BigDecimal maxLiftingHeight;
@TechnicalParameter(key = "maxLiftingSpeed", label = "空载最大起升速度", type = TechnicalParameter.ParamType.BIG_DECIMAL,unit = "km/h")
private BigDecimal maxLiftingSpeed;
} }
...@@ -41,7 +41,7 @@ public class TechParamUtil { ...@@ -41,7 +41,7 @@ public class TechParamUtil {
} }
public static void main(String[] args) { public static void main(String[] args) {
List<TechParamItem> techParamItems = getParamMetaList("3000", "3400", "3420", false); List<TechParamItem> techParamItems = getParamMetaList("2000", "2300", "23T0", "vehicleCylinder");
System.out.println(techParamItems); System.out.println(techParamItems);
} }
...@@ -57,7 +57,7 @@ public class TechParamUtil { ...@@ -57,7 +57,7 @@ public class TechParamUtil {
return techParamItem; return techParamItem;
} }
public static List<TechParamItem> getParamMetaList(String equListCode, String equCategoryCode, String equDefineCode, Boolean whetherVehicleCylinder) { public static List<TechParamItem> getParamMetaList(String equListCode, String equCategoryCode, String equDefineCode, String... tags) {
List<TechParamItem> techParamItems = new ArrayList<>(); List<TechParamItem> techParamItems = new ArrayList<>();
for (Class<? extends ITechParamDefine> subClass : subClasses) { for (Class<? extends ITechParamDefine> subClass : subClasses) {
Field[] fields = subClass.getDeclaredFields(); Field[] fields = subClass.getDeclaredFields();
...@@ -70,7 +70,18 @@ public class TechParamUtil { ...@@ -70,7 +70,18 @@ public class TechParamUtil {
boolean equCategoryMatch = technicalParameter.equCategory().length == 0 || StringUtils.isEmpty(equCategoryCode) || Arrays.asList(technicalParameter.equCategory()).contains(equCategoryCode); boolean equCategoryMatch = technicalParameter.equCategory().length == 0 || StringUtils.isEmpty(equCategoryCode) || Arrays.asList(technicalParameter.equCategory()).contains(equCategoryCode);
// 设备品种配置空时代表,全部都有 // 设备品种配置空时代表,全部都有
boolean equDefineMatch = technicalParameter.equDefine().length == 0 || StringUtils.isEmpty(equDefineCode) || Arrays.asList(technicalParameter.equDefine()).contains(equDefineCode); boolean equDefineMatch = technicalParameter.equDefine().length == 0 || StringUtils.isEmpty(equDefineCode) || Arrays.asList(technicalParameter.equDefine()).contains(equDefineCode);
if (equCategoryMatch && equDefineMatch) { // 标签是否匹配, 默认匹配
boolean tagMatch = true;
if (tags != null && tags.length > 0) {
List<String> filterTags = Arrays.asList(tags);
tagMatch = filterTags.stream().allMatch(tag-> Arrays.stream(technicalParameter.tags()).sequential().anyMatch(e->e.contains(tag)));
}
// 指定设备类别下默认字段设置
boolean ignoreField = false;
if (StringUtils.isEmpty(equDefineCode) && StringUtils.isNotEmpty(equCategoryCode) && technicalParameter.ignoreCategoryConf().length > 0) {
ignoreField = Arrays.asList(technicalParameter.ignoreCategoryConf()).contains(equCategoryCode);
}
if (!ignoreField && equCategoryMatch && equDefineMatch && tagMatch) {
TechParamItem techParamItem = getTechParamItem(equListCode, field); TechParamItem techParamItem = getTechParamItem(equListCode, field);
techParamItems.add(techParamItem); techParamItems.add(techParamItem);
} }
......
...@@ -20,6 +20,9 @@ import lombok.experimental.Accessors; ...@@ -20,6 +20,9 @@ import lombok.experimental.Accessors;
@Group(value = "tech_params_lifting") @Group(value = "tech_params_lifting")
public class TechParamsLiftingChangeFieldDto extends BaseTechParamsFieldDto { public class TechParamsLiftingChangeFieldDto extends BaseTechParamsFieldDto {
@FieldDisplayDefine(value = "额定载重量")
private String ratedLoadCapacity;
@FieldDisplayDefine(value = "额定起重量") @FieldDisplayDefine(value = "额定起重量")
private String ratedLiftingCapacity; private String ratedLiftingCapacity;
...@@ -79,11 +82,11 @@ public class TechParamsLiftingChangeFieldDto extends BaseTechParamsFieldDto { ...@@ -79,11 +82,11 @@ public class TechParamsLiftingChangeFieldDto extends BaseTechParamsFieldDto {
@FieldDisplayDefine(value = "额定横移速度") @FieldDisplayDefine(value = "额定横移速度")
private String ratedTraverseSpeed; private String ratedTraverseSpeed;
@FieldDisplayDefine(value = "单车最大(出)车时间") @FieldDisplayDefine(value = "单车最大(出)车时间")
@TableField("BICYCLE_MAX_EXIT_TIME") @TableField("BICYCLE_MAX_EXIT_TIME")
private String bicycleMaxExitTime; private String bicycleMaxExitTime;
@FieldDisplayDefine(value = "单车最大车时间") @FieldDisplayDefine(value = "单车最大(进)车时间")
private String bicycleMaxComeTime; private String bicycleMaxComeTime;
@FieldDisplayDefine(value = "区域防爆等级", dictCode = "FBDJ") @FieldDisplayDefine(value = "区域防爆等级", dictCode = "FBDJ")
......
...@@ -142,8 +142,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl { ...@@ -142,8 +142,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
String equList = jsonObject.getString("EQU_LIST"); String equList = jsonObject.getString("EQU_LIST");
String equCategory = jsonObject.getString("EQU_CATEGORY"); String equCategory = jsonObject.getString("EQU_CATEGORY");
String equDefine = jsonObject.getString("EQU_DEFINE"); String equDefine = jsonObject.getString("EQU_DEFINE");
Boolean whetherVehicleCylinder = "1".equals(jsonObject.getString("WHETHER_VEHICLE_CYLINDER")) ? Boolean.TRUE : Boolean.FALSE; String vehicleCylinder = "1".equals(jsonObject.getString("WHETHER_VEHICLE_CYLINDER")) ? "vehicleCylinder" : null;
List<TechParamItem> paramMetaList = TechParamUtil.getParamMetaList(equList, equCategory, equDefine, whetherVehicleCylinder); List<TechParamItem> paramMetaList = TechParamUtil.getParamMetaList(equList, equCategory, equDefine, vehicleCylinder);
JSONArray list = new JSONArray(); JSONArray list = new JSONArray();
for (int i = 0; i < paramMetaList.size(); i++) { for (int i = 0; i < paramMetaList.size(); i++) {
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
...@@ -2431,12 +2431,11 @@ public class ComprehensiveStatisticalAnalysisServiceImpl { ...@@ -2431,12 +2431,11 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
String equList = jsonObject.getString("EQU_LIST"); String equList = jsonObject.getString("EQU_LIST");
String equCategory = jsonObject.getString("EQU_CATEGORY"); String equCategory = jsonObject.getString("EQU_CATEGORY");
String equDefine = jsonObject.getString("EQU_DEFINE"); String equDefine = jsonObject.getString("EQU_DEFINE");
Boolean whetherVehicleCylinder = "1".equals(jsonObject.getString("WHETHER_VEHICLE_CYLINDER")) ? Boolean.TRUE : Boolean.FALSE; String vehicleCylinder = "1".equals(jsonObject.getString("WHETHER_VEHICLE_CYLINDER")) ? "vehicleCylinder" : null;
if ("".equals(equList) || null == equList) { if ("".equals(equList) || null == equList) {
throw new BaseException("需要先选择设备种类,才能选择技术参数", "200", "需要先选择设备种类,才能选择技术参数"); throw new BaseException("需要先选择设备种类,才能选择技术参数", "200", "需要先选择设备种类,才能选择技术参数");
} }
List<TechParamItem> paramMetaList = TechParamUtil.getParamMetaList(equList, equCategory, equDefine, whetherVehicleCylinder); List<TechParamItem> paramMetaList = TechParamUtil.getParamMetaList(equList, equCategory, equDefine, vehicleCylinder);
JSONArray list = new JSONArray(); JSONArray list = new JSONArray();
for (int i = 0; i < paramMetaList.size(); i++) { for (int i = 0; i < paramMetaList.size(); i++) {
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
......
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