|
@@ -207,7 +207,7 @@ public class LocationAllocationStrategy {
|
|
|
BaseLocationInfo currentLocation = null;
|
|
|
BaseLocationLotattVO currentLocationLotatt = null;
|
|
|
|
|
|
- //同批次属性优先出库
|
|
|
+ //同批次属性优先出库,进行效期排序
|
|
|
if (asnSoStrategy.getSoSameLotatt1Flag().equals("optimization")) {
|
|
|
if (asnSoStrategy.getSoPeriodFlag().equals("optimization") || asnSoStrategy.getSoPeriodFlag().equals("force")) {
|
|
|
sameLotattList.sort(new LocationSortComparator());
|
|
@@ -215,6 +215,12 @@ public class LocationAllocationStrategy {
|
|
|
for (LocationSortDTO locationSortDTO : list) {
|
|
|
List<BaseLocationLotattVO> locationInfoList = map.get(locationSortDTO.getColNo());
|
|
|
for (BaseLocationLotattVO b : locationInfoList) {
|
|
|
+ //如果不是强制效期优先的进行多列同时出库跳过已经在出库的列
|
|
|
+ if (!asnSoStrategy.getSoPeriodFlag().equals("force")) {
|
|
|
+ if (taskingFlag.get(b.getColNo())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (currentLocation == null) {
|
|
|
if (b.getIsEmpty().equals("N") && b.getStockStatus().equals("00")) {
|
|
|
BaseLocationInfo locationInfo = new BaseLocationInfo();
|
|
@@ -236,12 +242,17 @@ public class LocationAllocationStrategy {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if (asnSoStrategy.getSoPeriodFlag().equals("optimization") || asnSoStrategy.getSoPeriodFlag().equals("force")) { //近效期
|
|
|
+ //非同批次属性,进行效期排序
|
|
|
+ if (asnSoStrategy.getSoPeriodFlag().equals("optimization") || asnSoStrategy.getSoPeriodFlag().equals("force")) {
|
|
|
list.sort(new LocationSortComparator());
|
|
|
for (LocationSortDTO locationSortDTO : list) {
|
|
|
List<BaseLocationLotattVO> locationInfoList = map.get(locationSortDTO.getColNo());
|
|
|
for (BaseLocationLotattVO b : locationInfoList) {
|
|
|
+ if (!asnSoStrategy.getSoPeriodFlag().equals("force")) {
|
|
|
+ if (taskingFlag.get(b.getColNo())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (currentLocation == null) {
|
|
|
if (b.getIsEmpty().equals("N") && b.getStockStatus().equals("00")) {
|
|
|
BaseLocationInfo locationInfo = new BaseLocationInfo();
|
|
@@ -268,9 +279,15 @@ public class LocationAllocationStrategy {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
+ //不进行效期排序
|
|
|
for (Map.Entry<String, List<BaseLocationLotattVO>> entry : map.entrySet()) {
|
|
|
List<BaseLocationLotattVO> locationInfoList = entry.getValue();
|
|
|
for (BaseLocationLotattVO b : locationInfoList) {
|
|
|
+ if (!asnSoStrategy.getSoPeriodFlag().equals("force")) {
|
|
|
+ if (taskingFlag.get(b.getColNo())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (currentLocation == null) {
|
|
|
if (b.getIsEmpty().equals("N") && b.getStockStatus().equals("00")) {
|
|
|
BaseLocationInfo locationInfo = new BaseLocationInfo();
|