代码更新:

1. 修改电子标签库位分配的顺序
This commit is contained in:
梁州 2024-10-30 14:43:41 +08:00
parent 50e820b7ff
commit be2aee9cf8
2 changed files with 15 additions and 22 deletions

View File

@ -160,7 +160,9 @@ public class WorkServiceImplements implements IWorkService {
throw new Exception("站台:" + workStation + "没有足够可用的电子标签位!");
}
for (ETagLocation eTagLocation : eTagLocationList) {
if (!boxNoList.isEmpty()) {
if (boxNoList.isEmpty()) {
break;
}
String tempBoxNo = boxNoList.get(0);
ELocationConfig eLocationConfig = new ELocationConfig();
eLocationConfig.setWorkOrder(tempBoxNo.split("@")[0]);
@ -173,7 +175,6 @@ public class WorkServiceImplements implements IWorkService {
// 移除已经分配的盒子
boxNoList.remove(tempBoxNo);
}
}
// 将电子标签库位配置存进数据库
eLocationConfigService.saveBatch(eLocationConfigList);
}
@ -652,7 +653,7 @@ public class WorkServiceImplements implements IWorkService {
List<ELocationConfig> 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<KateOrders>()
@ -789,6 +790,7 @@ public class WorkServiceImplements implements IWorkService {
} else {
stationConfigQueryWrapper.ne(WorkStationConfig::getModel, "MWL");
}
stationConfigQueryWrapper.orderByAsc(WorkStationConfig::getSmallBox);
List<WorkStationConfig> currentStationConfigsOfNwl = workStationConfigService.list(stationConfigQueryWrapper);
// 没有工站配置
if (currentStationConfigsOfNwl == null || currentStationConfigsOfNwl.isEmpty()) {

View File

@ -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 # 实体类扫描包