Lius
2025-08-27 fa1f4cdd548662fc2619c4675588b9797e0dd9fa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
    }
}