package com.zy.asrs.wms.asrs.service.impl; import com.zy.asrs.wms.asrs.entity.Loc; import com.zy.asrs.wms.asrs.mapper.LanewayRuleMapper; import com.zy.asrs.wms.asrs.entity.LanewayRule; import com.zy.asrs.wms.asrs.service.LanewayRuleService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; import java.util.List; @Service("lanewayRuleService") public class LanewayRuleServiceImpl extends ServiceImpl implements LanewayRuleService { @Override public LanewayRule getLaneByLoc(Loc loc) { List list = this.list(); for (LanewayRule rule : list) { List laneX = rule.getLaneX$(); List laneY = rule.getLaneY$(); laneX.addAll(laneY); if (laneX.contains(loc.getRow1())) { return rule; } } return null; } }