| | |
| | | package com.mes.md.service.impl; |
| | | |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.md.entity.Line; |
| | | import com.mes.md.entity.LineConfiguration; |
| | | import com.mes.md.entity.Machine; |
| | | import com.mes.md.mapper.LineConfigurationMapper; |
| | | import com.mes.md.mapper.LineMapper; |
| | | import com.mes.md.service.LineConfigurationService; |
| | | import com.mes.md.service.LineService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class LineConfigurationServiceImpl extends MPJBaseServiceImpl<LineConfigurationMapper, LineConfiguration> implements LineConfigurationService { |
| | | |
| | | @Override |
| | | public LineConfiguration machineLineConfiguration(Machine machine){ |
| | | List<LineConfiguration> machineLineConfiguration=baseMapper.selectJoinList(LineConfiguration.class,new MPJLambdaWrapper<LineConfiguration>() |
| | | .selectAll(LineConfiguration.class) |
| | | .eq(LineConfiguration::getMachineId,machine.getId())); |
| | | if(machineLineConfiguration.isEmpty()){ |
| | | return null; |
| | | } |
| | | return machineLineConfiguration.get(0); |
| | | } |
| | | } |