refactor: 自动分配优化
This commit is contained in:
parent
4711eac382
commit
18a0416a28
@ -102,7 +102,7 @@ public class WmsInTaskController extends BaseController {
|
||||
}
|
||||
|
||||
// 自动分配非临时库位
|
||||
WmStorageArea wmStorageArea = this.wmStorageLocationService.queryOneAreaByLocationCode("DDJ01", ucmCtBaseByCode.getAttr3() == 1);
|
||||
WmStorageArea wmStorageArea = this.wmStorageLocationService.queryOneAreaByLocationCode("DDJ01", ucmCtBaseByCode.getAttr3() != null && ucmCtBaseByCode.getAttr3() == 1);
|
||||
wmsInTask.setCellTgt(wmStorageArea.getAreaId());
|
||||
wmsInTask.setCellName(wmStorageArea.getAreaName());
|
||||
wmsInTask.setCellCode(wmStorageArea.getAreaCode());
|
||||
|
@ -172,7 +172,8 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService {
|
||||
// 过滤掉临时库位
|
||||
.filter(it -> !it.getAreaCode().equals("TEMP"))
|
||||
.collect(Collectors.toList());
|
||||
if (wmStorageAreaList.isEmpty()) throw new RuntimeException("自动获取库位失败,无可用库位");
|
||||
if (wmStorageAreaList == null || wmStorageAreaList.isEmpty())
|
||||
throw new RuntimeException("自动获取库位失败,无可用库位");
|
||||
|
||||
// 返回第一个可用的库位
|
||||
return wmStorageAreaList.get(0);
|
||||
|
@ -62,6 +62,7 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService {
|
||||
return null;
|
||||
}
|
||||
for (BaseKnife baseKnife : ucmCtBase.getBaseKnifeList()) {
|
||||
wmsInTaskList.clear();
|
||||
WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity();
|
||||
wmsInPlanDetailEntityQuery.setRfid(baseKnife.getRfid());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user