diff --git a/src/main/java/com/wms/service/business/serviceImplements/WorkServiceImplements.java b/src/main/java/com/wms/service/business/serviceImplements/WorkServiceImplements.java index 567071b..117a74a 100644 --- a/src/main/java/com/wms/service/business/serviceImplements/WorkServiceImplements.java +++ b/src/main/java/com/wms/service/business/serviceImplements/WorkServiceImplements.java @@ -160,19 +160,20 @@ public class WorkServiceImplements implements IWorkService { throw new Exception("站台:" + workStation + "没有足够可用的电子标签位!"); } for (ETagLocation eTagLocation : eTagLocationList) { - if (!boxNoList.isEmpty()) { - String tempBoxNo = boxNoList.get(0); - ELocationConfig eLocationConfig = new ELocationConfig(); - eLocationConfig.setWorkOrder(tempBoxNo.split("@")[0]); - eLocationConfig.setWorkCenter(tempBoxNo.split("@")[1]); - eLocationConfig.setWorkStation(workStation); - eLocationConfig.setELocationId(eTagLocation.getELocationId()); - eLocationConfig.setOrderBoxNo(tempBoxNo); - // 添加配置 - eLocationConfigList.add(eLocationConfig); - // 移除已经分配的盒子 - boxNoList.remove(tempBoxNo); + if (boxNoList.isEmpty()) { + break; } + String tempBoxNo = boxNoList.get(0); + ELocationConfig eLocationConfig = new ELocationConfig(); + eLocationConfig.setWorkOrder(tempBoxNo.split("@")[0]); + eLocationConfig.setWorkCenter(tempBoxNo.split("@")[1]); + eLocationConfig.setWorkStation(workStation); + eLocationConfig.setELocationId(eTagLocation.getELocationId()); + eLocationConfig.setOrderBoxNo(tempBoxNo); + // 添加配置 + eLocationConfigList.add(eLocationConfig); + // 移除已经分配的盒子 + boxNoList.remove(tempBoxNo); } // 将电子标签库位配置存进数据库 eLocationConfigService.saveBatch(eLocationConfigList); @@ -652,7 +653,7 @@ public class WorkServiceImplements implements IWorkService { List currentBoxELocationList = eLocationConfigList.stream().filter(e -> e.getWorkOrder().equals(workFlow.getWorkOrder()) && e.getWorkCenter().equals(workFlow.getWorkCenter())).toList(); - summary.setELocationId(currentBoxELocationList.size() > 0 ? currentBoxELocationList.get(0).getELocationId() : ""); + summary.setELocationId(!currentBoxELocationList.isEmpty() ? currentBoxELocationList.get(0).getELocationId() : ""); workSummaryList.add(summary); // 更新工单表 kateOrdersService.update(new LambdaUpdateWrapper() @@ -789,6 +790,7 @@ public class WorkServiceImplements implements IWorkService { } else { stationConfigQueryWrapper.ne(WorkStationConfig::getModel, "MWL"); } + stationConfigQueryWrapper.orderByAsc(WorkStationConfig::getSmallBox); List currentStationConfigsOfNwl = workStationConfigService.list(stationConfigQueryWrapper); // 没有工站配置 if (currentStationConfigsOfNwl == null || currentStationConfigsOfNwl.isEmpty()) { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index c7d9413..56ed7f9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -46,15 +46,6 @@ server: enabled: true force: true -swagger: - # swagger配置 - enable: true - title: 菲达宝开WMS - description: 菲达宝开WMS - version: 1.0 - base-package: com.wms.controller - scan-packages: com.wms.controller - mybatis-plus: mapper-locations: classpath*:mapper/*.xml # mapper.xml扫描包 type-aliases-package: com.wms.entity.table # 实体类扫描包