Lius
2023-10-12 998307fa4f923e37064853a2583b48103dd0d89b
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcWorkshopInfoServiceImpl.java
@@ -2,12 +2,15 @@
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;
/**
@@ -19,6 +22,9 @@
@Service
public class MdcWorkshopInfoServiceImpl extends ServiceImpl<MdcWorkshopInfoMapper, MdcWorkshopInfo> implements IMdcWorkshopInfoService {
    @Resource
    private IMdcEquipmentTypeService mdcEquipmentTypeService;
    /**
     * 大屏信息
     * @param workshopId
@@ -26,6 +32,12 @@
     */
    @Override
    public List<MdcBigScreenEquipmentDto> getBigScreenInfo(String workshopId) {
        return this.baseMapper.getBigScreenInfo(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;
    }
}