| | |
| | | package org.jeecg.modules.mdc.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.modules.mdc.dto.OptionsDto; |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 根据控制系统类型获取参数 |
| | | */ |
| | | @Override |
| | | public List<OptionsDto> getDriveParamOptionsByType(String controlSystemType) { |
| | | List<OptionsDto> result = new ArrayList<>(); |
| | | List<MdcDriveTypeParamConfig> mdcDriveTypeParamConfigList = super.list(new LambdaQueryWrapper<MdcDriveTypeParamConfig>().eq(MdcDriveTypeParamConfig::getControlSystemType, controlSystemType).eq(MdcDriveTypeParamConfig::getCurveGenerationFlags, CommonConstant.YN_Y)); |
| | | if (mdcDriveTypeParamConfigList != null && !mdcDriveTypeParamConfigList.isEmpty()) { |
| | | for (MdcDriveTypeParamConfig mdcDriveTypeParamConfig : mdcDriveTypeParamConfigList) { |
| | | OptionsDto optionsDto = new OptionsDto(); |
| | | optionsDto.setLabel(mdcDriveTypeParamConfig.getEnglishName() + "(" + mdcDriveTypeParamConfig.getChineseName() + ")"); |
| | | optionsDto.setValue(mdcDriveTypeParamConfig.getEnglishName() + "(" + mdcDriveTypeParamConfig.getChineseName() + ")"); |
| | | result.add(optionsDto); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | } |