package org.jeecg.modules.iot.mdc.service.impl;
|
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.modules.iot.mdc.entity.MdcDriveTypeParamConfig;
|
import org.jeecg.modules.iot.mdc.mapper.MdcDriveTypeParamConfigMapper;
|
import org.jeecg.modules.iot.mdc.service.IMdcDriveTypeParamConfigService;
|
import org.springframework.stereotype.Service;
|
|
import java.util.Arrays;
|
import java.util.List;
|
|
/**
|
* @Description: 驱动参数配置
|
* @Author: jeecg-boot
|
* @Date: 2023-04-20
|
* @Version: V1.0
|
*/
|
@Service("iotMdcDriveTypeParamConfigServiceImpl")
|
public class MdcDriveTypeParamConfigServiceImpl extends ServiceImpl<MdcDriveTypeParamConfigMapper, MdcDriveTypeParamConfig> implements IMdcDriveTypeParamConfigService {
|
@Override
|
public MdcDriveTypeParamConfig selectMdcDriveTypeParamConfigByEquipment(String controlSystemType, String englishName) {
|
return new LambdaQueryChainWrapper<>(baseMapper)
|
.eq(MdcDriveTypeParamConfig::getControlSystemType, controlSystemType)
|
.eq(MdcDriveTypeParamConfig::getEnglishName, englishName).one();
|
}
|
|
@Override
|
public boolean selectEnglishNameByEquipment(String controlSystemType, String englishName) {
|
Long count = new LambdaQueryChainWrapper<>(baseMapper)
|
.eq(MdcDriveTypeParamConfig::getControlSystemType, controlSystemType)
|
.eq(MdcDriveTypeParamConfig::getEnglishName, englishName).count();
|
return count > 0;
|
}
|
}
|