Lius
2023-10-12 998307fa4f923e37064853a2583b48103dd0d89b
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
43
package org.jeecg.modules.mdc.service.impl;
 
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.mdc.dto.MdcBigScreenEquipmentDto;
import org.jeecg.modules.mdc.entity.MdcWorkshopInfo;
import org.jeecg.modules.mdc.mapper.MdcWorkshopInfoMapper;
import org.jeecg.modules.mdc.service.IMdcEquipmentTypeService;
import org.jeecg.modules.mdc.service.IMdcWorkshopInfoService;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * @Description: 大屏车间信息
 * @Author: Lius
 * @Date: 2023-10-11
 * @Version: V1.0
 */
@Service
public class MdcWorkshopInfoServiceImpl extends ServiceImpl<MdcWorkshopInfoMapper, MdcWorkshopInfo> implements IMdcWorkshopInfoService {
 
    @Resource
    private IMdcEquipmentTypeService mdcEquipmentTypeService;
 
    /**
     * 大屏信息
     * @param workshopId
     * @return
     */
    @Override
    public List<MdcBigScreenEquipmentDto> getBigScreenInfo(String workshopId) {
        List<MdcBigScreenEquipmentDto> list = this.baseMapper.getBigScreenInfo(workshopId);
        for (MdcBigScreenEquipmentDto mdcBigScreenEquipmentDto : list) {
            if (StringUtils.isEmpty(mdcBigScreenEquipmentDto.getEquipmentImage())) {
                mdcBigScreenEquipmentDto.setEquipmentImage(mdcEquipmentTypeService.findEquipmentTypeImage(mdcBigScreenEquipmentDto.getEquipmentType()));
            }
        }
        return list;
    }
}