Commit f5e8c691 authored by Tong Li's avatar Tong Li

Merge remote-tracking branch 'origin/tl'

parents 7c7c3461 b293810c
...@@ -283,7 +283,7 @@ if(finishedOrder==null||finishedOrder.size()==0) ...@@ -283,7 +283,7 @@ if(finishedOrder==null||finishedOrder.size()==0)
List<OrderMaterialRequirement> orderMaterials = materialRequirementService.buildMultiLevelRequirementNetwork(chromosome, sceneId, baseTime,_globalParam); List<OrderMaterialRequirement> orderMaterials = materialRequirementService.buildMultiLevelRequirementNetwork(chromosome, sceneId, baseTime,_globalParam);
chromosome.setScenarioID(sceneId);
if(_globalParam.isIsCheckSf()) { if(_globalParam.isIsCheckSf()) {
int isnew= generateGlobalOpList(chromosome); int isnew= generateGlobalOpList(chromosome);
......
...@@ -1214,26 +1214,28 @@ if(headers1==null) ...@@ -1214,26 +1214,28 @@ if(headers1==null)
routingsupportingreplaces2 = routingsupportingreplaces. routingsupportingreplaces2 = routingsupportingreplaces.
stream() stream()
.filter(t -> t.getStrsupid().equals(orderMaterial.getBomId()) .filter(t -> t.getStrsupid().equals(orderMaterial.getBomId())
&& t.getMaterialid() != orderMaterial.getMaterialId()) && t.getMaterialid().equals(orderMaterial.getMaterialId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
if (routingsupportingreplaces2 != null && routingsupportingreplaces2.size() > 1) { if (routingsupportingreplaces2 != null && routingsupportingreplaces2.size() > 1) {
for (RoutingSupportingReplace rsr : routingsupportingreplaces2) { for (RoutingSupportingReplace rsr : routingsupportingreplaces2) {
Material material1 = materials.stream() Material material1 = materials.stream()
.filter(m -> m.getId().equals(rsr.getMaterialid())) .filter(m -> m.getId().equals(rsr.getTargetmaterialid()))
.findFirst() .findFirst()
.orElse(null); .orElse(null);
if (material1 == null) { if (material1 == null) {
break; break;
} }
OrderMaterialRequirement orderMaterial1 = MaterialStock(material1, rsr.getMaterialid(), orderMaterial.getOrderId(), orderMaterial.getChildOrderId(), operation, allneeded, needed, earliestStartTime); OrderMaterialRequirement orderMaterial1 = MaterialStock(material1, rsr.getTargetmaterialid(), orderMaterial.getOrderId(), orderMaterial.getChildOrderId(), operation, allneeded, needed, earliestStartTime);
if (orderMaterial1 != null) { if (orderMaterial1 != null) {
useStock = orderMaterial1.getUseStock(); useStock = orderMaterial1.getUseStock();
needed -= useStock;
orderMaterial.setUseStock(orderMaterial.getUseStock() + useStock); needed -= useStock;
orderMaterial.getReplaceMaterial().add(orderMaterial1); orderMaterial.setUseStock(orderMaterial.getUseStock() + useStock);
if (needed <= 0) { orderMaterial.getReplaceMaterial().add(orderMaterial1);
break; if (needed <= 0) {
} break;
}
} }
} }
} }
...@@ -1255,7 +1257,7 @@ if(headers1==null) ...@@ -1255,7 +1257,7 @@ if(headers1==null)
for (RoutingSupportingReplace rsr:routingsupportingreplaces2) { for (RoutingSupportingReplace rsr:routingsupportingreplaces2) {
OrderMaterialRequirement orderMaterial1= orderMaterial.getReplaceMaterial().stream() OrderMaterialRequirement orderMaterial1= orderMaterial.getReplaceMaterial().stream()
.filter(t->t.getMaterialId().equals(rsr.getMaterialid())) .filter(t->t.getMaterialId().equals(rsr.getTargetmaterialid()))
.findFirst() .findFirst()
.orElse(null); .orElse(null);
...@@ -1336,6 +1338,7 @@ if(headers1==null) ...@@ -1336,6 +1338,7 @@ if(headers1==null)
} }
} }
} }
orderMaterial.getReplaceMaterial().removeIf(t->t.getUseStock()==0&&t.getUseTransit()==0);
} }
// 计算预计可用时间 // 计算预计可用时间
......
...@@ -10,8 +10,8 @@ spring: ...@@ -10,8 +10,8 @@ spring:
pathmatch: pathmatch:
matching-strategy: ant_path_matcher # Spring Boot 2.6+ 需要这个配置 matching-strategy: ant_path_matcher # Spring Boot 2.6+ 需要这个配置
redis: redis:
host: 192.168.0.181 host: 39.100.88.40
port: 6380 port: 6379
timeout: 120000 timeout: 120000
database: 10 database: 10
password: redis@228! password: redis@228!
...@@ -55,7 +55,7 @@ spring: ...@@ -55,7 +55,7 @@ spring:
# Oracle数据源 # Oracle数据源
oracle: oracle:
driver-class-name: oracle.jdbc.OracleDriver driver-class-name: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@//192.168.0.181:1522/ORCLPDB1 # ORCL为你的Oracle实例名 url: jdbc:oracle:thin:@//39.100.78.207:7002/ORCLPDB1 # ORCL为你的Oracle实例名
username: mes # 替换为你的Oracle用户名 username: mes # 替换为你的Oracle用户名
password: root_mes123456 # 替换为你的Oracle密码 password: root_mes123456 # 替换为你的Oracle密码
# sqlserver: # sqlserver:
......
...@@ -42,7 +42,7 @@ public class PlanResultServiceTest { ...@@ -42,7 +42,7 @@ public class PlanResultServiceTest {
// planResultService.execute2("5475E00B844847ACB6DC20227967BA2F"); // planResultService.execute2("5475E00B844847ACB6DC20227967BA2F");
// planResultService.execute2("00E0C5D3E4AD4F36B56C39395906618D"); // planResultService.execute2("00E0C5D3E4AD4F36B56C39395906618D");
// planResultService.execute2("726D4C1A712B4B1393175BD44B775B66"); planResultService.execute2("31F0FF4DFAD844BD9C72EDEEF3430A1F");
// planResultService.execute2("265F24B6DF3C40E4B17D193B0CC8AAF2"); // planResultService.execute2("265F24B6DF3C40E4B17D193B0CC8AAF2");
// LocalDateTime t= LocalDateTime.of(2026, 02, 14, 1, 25, 52); // LocalDateTime t= LocalDateTime.of(2026, 02, 14, 1, 25, 52);
// List<Integer> opids=new ArrayList<>();//BCA6FA43FFA444D3952CF8F6E1EA291B // List<Integer> opids=new ArrayList<>();//BCA6FA43FFA444D3952CF8F6E1EA291B
...@@ -51,10 +51,10 @@ public class PlanResultServiceTest { ...@@ -51,10 +51,10 @@ public class PlanResultServiceTest {
// planResultService.Redecode("27065EA0ECD14A81B7FAAFEF52273F93"); // planResultService.Redecode("27065EA0ECD14A81B7FAAFEF52273F93");
// planResultService.Redecode("921BC266191E4812A105E406BF91E812"); // planResultService.Redecode("921BC266191E4812A105E406BF91E812");
// planResultService.Drag("27065EA0ECD14A81B7FAAFEF52273F93",opids,6,false,0l); // planResultService.Drag("27065EA0ECD14A81B7FAAFEF52273F93",opids,6,false,0l);
MaintenanceWindow maintenanceWindow=new MaintenanceWindow(); // MaintenanceWindow maintenanceWindow=new MaintenanceWindow();
maintenanceWindow.setStartTime(LocalDateTime.of(2026, 9, 13, 0, 0, 0)); // maintenanceWindow.setStartTime(LocalDateTime.of(2026, 9, 13, 0, 0, 0));
maintenanceWindow.setEndTime(LocalDateTime.of(2025, 9, 19, 0, 0, 0)); // maintenanceWindow.setEndTime(LocalDateTime.of(2025, 9, 19, 0, 0, 0));
planResultService.AddMaintenanceWindow("5475E00B844847ACB6DC20227967BA2F",2488l,maintenanceWindow); // planResultService.AddMaintenanceWindow("5475E00B844847ACB6DC20227967BA2F",2488l,maintenanceWindow);
// // planResultService.DelOperation("B6AE363FF5044DDF8DECE32D5FE0F7EA",7); // // planResultService.DelOperation("B6AE363FF5044DDF8DECE32D5FE0F7EA",7);
// planResultService.SpiltOrder("A41D662EE0764D008173C5A0E42B15F6","5f9d5383-b89a-4a4f-8805-2f617c711968",new Double[]{500d, 500d}); // planResultService.SpiltOrder("A41D662EE0764D008173C5A0E42B15F6","5f9d5383-b89a-4a4f-8805-2f617c711968",new Double[]{500d, 500d});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment