| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.manager.controller.params.LocMastInitParam; |
| | |
| | | import com.vincent.rsf.server.manager.mapper.LocTypeRelaMapper; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vincent.rsf.server.manager.utils.Shelves; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | List<Loc> list = new ArrayList<>(); |
| | | Integer chanl = 0; //默认第一巷道 |
| | | for (int r = param.getStartRow(); r <= param.getEndRow(); r++) { |
| | | if (r % param.getChannel() == 1) { |
| | | chanl ++; |
| | | try{ |
| | | Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getChannel(),param.getStartRow()); |
| | | for (List<Integer> node : shelves.nodes){ |
| | | if (node.contains(r)) { |
| | | if (!Cools.isEmpty(param.getStartChannel()) && param.getStartChannel() > 0){ |
| | | chanl = shelves.nodes.indexOf(node) + param.getStartChannel(); |
| | | }else { |
| | | chanl = shelves.nodes.indexOf(node) + 1; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | throw new CoolException("解析巷道号失败"); |
| | | } |
| | | for (int b = param.getStartBay(); b <= param.getEndBay(); b++) { |
| | | for (int l = param.getStartLev(); l <= param.getEndLev(); l++) { |