Merge remote-tracking branch 'origin/master'

This commit is contained in:
刘名喜 2024-12-19 09:17:07 +08:00
commit fe34ec181e
3 changed files with 4 additions and 2 deletions

View File

@ -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());

View File

@ -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);

View File

@ -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());