lius
2023-06-08 534aec7a687ceca8120ba798ad20d80d7058ffe6
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
37
38
39
40
41
42
package org.jeecg.modules.mdc.service.impl;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.modules.mdc.entity.MdcDriveTypeParamConfig;
import org.jeecg.modules.mdc.mapper.MdcDriveTypeParamConfigMapper;
import org.jeecg.modules.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
public class MdcDriveTypeParamConfigServiceImpl extends ServiceImpl<MdcDriveTypeParamConfigMapper, MdcDriveTypeParamConfig> implements IMdcDriveTypeParamConfigService {
 
    /**
     * 根据驱动类型获取设备显示参数
     */
    @Override
    public List<MdcDriveTypeParamConfig> getShowDriveParam(String driveType) {
        return lambdaQuery().eq(MdcDriveTypeParamConfig::getControlSystemType, driveType).eq(MdcDriveTypeParamConfig::getShowFlag, CommonConstant.YN_Y).list();
    }
 
    /**
     * 根据设备编码获取工作曲线参数
     */
    @Override
    public List<MdcDriveTypeParamConfig> findWorkCurveParamList(String equipmentId) {
        return this.baseMapper.findWorkCurveParamList(equipmentId);
    }
 
    @Override
    public List<MdcDriveTypeParamConfig> getByTypeCodeMdcShowCode(String codeTypeId) {
        return this.baseMapper.selectBatchIds(Arrays.asList(codeTypeId.split(",")));
    }
}