rev:修改出库规则:整出优先
This commit is contained in:
@@ -13,6 +13,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -54,8 +55,11 @@ public class FIFORuleHandler extends Decisioner<StructattrVechielDto, JSONObject
|
||||
List<StructattrVechielDto> vechielDtos = iStIvtStructattrService.collectVechicle(MapOf.of("material_id", param.getString("material_id")
|
||||
, "pcsn", param.getString("pcsn")
|
||||
, "stor_code", param.getString("stor_code")
|
||||
, "order_by", "update_time asc")
|
||||
, "plan_qty", plan_qty
|
||||
, "order_by", "ABS(qty-#{plan_qty}) asc,update_time asc")
|
||||
);
|
||||
int finalPlan_qty = plan_qty;
|
||||
vechielDtos.sort(Comparator.comparingInt(o -> (o.getQty().intValue() - finalPlan_qty)));
|
||||
List<String> need = list.stream().map(StructattrVechielDto::getVehicle_code).collect(Collectors.toList());
|
||||
|
||||
List<StructattrVechielDto> disList = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user