返回数据修改

parent a17d29cb
...@@ -84,6 +84,10 @@ ...@@ -84,6 +84,10 @@
"priority" : 1.0, "priority" : 1.0,
"id" : 1, "id" : 1,
"groupId" : 1, "groupId" : 1,
"dependentOnOrderIds" : [ ],
"materialRequirements" : null,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"quantity" : 50000.0,
"discreteParameter" : [ { "discreteParameter" : [ {
"id" : 14, "id" : 14,
"creationTime" : "2025-12-03T14:03:46", "creationTime" : "2025-12-03T14:03:46",
...@@ -119,20 +123,16 @@ ...@@ -119,20 +123,16 @@
"parameterId" : "87fd2237-7c4e-402e-8bde-85a0268bdbe1", "parameterId" : "87fd2237-7c4e-402e-8bde-85a0268bdbe1",
"parameterName" : "ces133" "parameterName" : "ces133"
} ], } ],
"materialRequirements" : null,
"dependentOnOrderIds" : [ ],
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"quantity" : 50000.0,
"execId" : "65ffe1c733cc4a888ca3dcc28a7ab65a", "execId" : "65ffe1c733cc4a888ca3dcc28a7ab65a",
"sequence" : 1, "sequence" : 1,
"equipTypeID" : 1661,
"prevEntryIds" : [ ],
"nextEntryIds" : [ { "nextEntryIds" : [ {
"prevOperationId" : 0, "prevOperationId" : 0,
"nextOperationId" : 2, "nextOperationId" : 2,
"dependencyType" : "FinishToStart", "dependencyType" : "FinishToStart",
"id" : 0 "id" : 0
} ], } ],
"prevEntryIds" : [ ],
"equipTypeID" : 1661,
"machineOptions" : [ { "machineOptions" : [ {
"machineId" : 3403, "machineId" : 3403,
"processingTime" : 0.72, "processingTime" : 0.72,
...@@ -149,9 +149,9 @@ ...@@ -149,9 +149,9 @@
"preTime" : 0 "preTime" : 0
} ], } ],
"selectMachineID" : 3403, "selectMachineID" : 3403,
"latestCompletionTime" : null,
"targetFinishedOperationId" : 0,
"isInterrupt" : true, "isInterrupt" : true,
"targetFinishedOperationId" : 0,
"latestCompletionTime" : null,
"mainId" : null "mainId" : null
}, },
"globalOpId" : 0 "globalOpId" : 0
...@@ -206,21 +206,21 @@ ...@@ -206,21 +206,21 @@
"priority" : 1.0, "priority" : 1.0,
"id" : 2, "id" : 2,
"groupId" : 1, "groupId" : 1,
"discreteParameter" : [ ],
"materialRequirements" : null,
"dependentOnOrderIds" : [ ], "dependentOnOrderIds" : [ ],
"materialRequirements" : null,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53", "orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"quantity" : 50000.0, "quantity" : 50000.0,
"discreteParameter" : [ ],
"execId" : "36200a5d39aa43eb956824baa3d7961c", "execId" : "36200a5d39aa43eb956824baa3d7961c",
"sequence" : 2, "sequence" : 2,
"equipTypeID" : 1621, "nextEntryIds" : [ ],
"prevEntryIds" : [ { "prevEntryIds" : [ {
"prevOperationId" : 1, "prevOperationId" : 1,
"nextOperationId" : 0, "nextOperationId" : 0,
"dependencyType" : "FinishToStart", "dependencyType" : "FinishToStart",
"id" : 0 "id" : 0
} ], } ],
"nextEntryIds" : [ ], "equipTypeID" : 1621,
"machineOptions" : [ { "machineOptions" : [ {
"machineId" : 3243, "machineId" : 3243,
"processingTime" : 1.2, "processingTime" : 1.2,
...@@ -237,9 +237,9 @@ ...@@ -237,9 +237,9 @@
"preTime" : 0 "preTime" : 0
} ], } ],
"selectMachineID" : 3243, "selectMachineID" : 3243,
"latestCompletionTime" : null,
"targetFinishedOperationId" : 0,
"isInterrupt" : true, "isInterrupt" : true,
"targetFinishedOperationId" : 0,
"latestCompletionTime" : null,
"mainId" : null "mainId" : null
}, },
"globalOpId" : 1 "globalOpId" : 1
...@@ -282,16 +282,16 @@ ...@@ -282,16 +282,16 @@
"priority" : 1.0, "priority" : 1.0,
"id" : 3, "id" : 3,
"groupId" : 2, "groupId" : 2,
"discreteParameter" : [ ],
"materialRequirements" : null,
"dependentOnOrderIds" : [ ], "dependentOnOrderIds" : [ ],
"materialRequirements" : null,
"orderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f", "orderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f",
"quantity" : 20.0, "quantity" : 20.0,
"discreteParameter" : [ ],
"execId" : "3dbe438ec2714f3d830bb186df914370", "execId" : "3dbe438ec2714f3d830bb186df914370",
"sequence" : 1, "sequence" : 1,
"equipTypeID" : 746,
"prevEntryIds" : [ ],
"nextEntryIds" : [ ], "nextEntryIds" : [ ],
"prevEntryIds" : [ ],
"equipTypeID" : 746,
"machineOptions" : [ { "machineOptions" : [ {
"machineId" : 2183, "machineId" : 2183,
"processingTime" : 3600.0, "processingTime" : 3600.0,
...@@ -301,12 +301,100 @@ ...@@ -301,12 +301,100 @@
"preTime" : 0 "preTime" : 0
} ], } ],
"selectMachineID" : 2183, "selectMachineID" : 2183,
"latestCompletionTime" : null,
"targetFinishedOperationId" : 0,
"isInterrupt" : true, "isInterrupt" : true,
"targetFinishedOperationId" : 0,
"latestCompletionTime" : null,
"mainId" : null "mainId" : null
}, },
"globalOpId" : 2 "globalOpId" : 2
}, {
"groupId" : 1,
"sequence" : 3,
"op" : {
"Id" : 4,
"GroupId" : 1,
"OrderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"routingId" : null,
"routingDetailId" : 555854,
"taskSeq" : 10,
"routingDetailName" : "30 包装",
"productId" : "cbd0dd08-e92e-f846-8577-c359540fb09a",
"ExecId" : "b492793a49c947bf81bd33239b4dfbdd",
"MainId" : "3ab1f4c69ec2463f997a4d63c404ee50",
"DiscreteParameter" : [ ],
"Priority" : 1.0,
"Quantity" : 30000.0,
"Sequence" : 3,
"MachineOptions" : [ {
"machineId" : 3243,
"processingTime" : 1.2,
"setupTime" : 0,
"teardownTime" : 0,
"contantTime" : 1,
"preTime" : 0
}, {
"machineId" : 3401,
"processingTime" : 1.2,
"setupTime" : 0,
"teardownTime" : 0,
"contantTime" : 1,
"preTime" : 0
} ],
"SelectMachineID" : 3243,
"PrevEntryIds" : [ {
"prevOperationId" : 1,
"nextOperationId" : 0,
"dependencyType" : "FinishToStart",
"id" : 0
} ],
"NextEntryIds" : [ ],
"state" : 2,
"IsInterrupt" : true,
"MaterialRequirements" : null,
"EquipTypeID" : 1621,
"DependentOnOrderIds" : [ ],
"TargetFinishedOperationId" : 0,
"LatestCompletionTime" : null,
"priority" : 1.0,
"id" : 4,
"groupId" : 1,
"dependentOnOrderIds" : [ ],
"materialRequirements" : null,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"quantity" : 30000.0,
"discreteParameter" : [ ],
"execId" : "b492793a49c947bf81bd33239b4dfbdd",
"sequence" : 3,
"nextEntryIds" : [ ],
"prevEntryIds" : [ {
"prevOperationId" : 1,
"nextOperationId" : 0,
"dependencyType" : "FinishToStart",
"id" : 0
} ],
"equipTypeID" : 1621,
"machineOptions" : [ {
"machineId" : 3243,
"processingTime" : 1.2,
"setupTime" : 0,
"teardownTime" : 0,
"contantTime" : 1,
"preTime" : 0
}, {
"machineId" : 3401,
"processingTime" : 1.2,
"setupTime" : 0,
"teardownTime" : 0,
"contantTime" : 1,
"preTime" : 0
} ],
"selectMachineID" : 3243,
"isInterrupt" : true,
"targetFinishedOperationId" : 0,
"latestCompletionTime" : null,
"mainId" : "3ab1f4c69ec2463f997a4d63c404ee50"
},
"globalOpId" : 3
} ], } ],
"allOperations" : [ { "allOperations" : [ {
"Id" : 1, "Id" : 1,
...@@ -379,6 +467,11 @@ ...@@ -379,6 +467,11 @@
"nextOperationId" : 2, "nextOperationId" : 2,
"dependencyType" : "FinishToStart", "dependencyType" : "FinishToStart",
"id" : 0 "id" : 0
}, {
"prevOperationId" : 0,
"nextOperationId" : 4,
"dependencyType" : "FinishToStart",
"id" : 0
} ], } ],
"state" : null, "state" : null,
"IsInterrupt" : true, "IsInterrupt" : true,
...@@ -390,6 +483,10 @@ ...@@ -390,6 +483,10 @@
"priority" : 1.0, "priority" : 1.0,
"id" : 1, "id" : 1,
"groupId" : 1, "groupId" : 1,
"dependentOnOrderIds" : [ ],
"materialRequirements" : null,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"quantity" : 50000.0,
"discreteParameter" : [ { "discreteParameter" : [ {
"id" : 14, "id" : 14,
"creationTime" : "2025-12-03T14:03:46", "creationTime" : "2025-12-03T14:03:46",
...@@ -425,20 +522,21 @@ ...@@ -425,20 +522,21 @@
"parameterId" : "87fd2237-7c4e-402e-8bde-85a0268bdbe1", "parameterId" : "87fd2237-7c4e-402e-8bde-85a0268bdbe1",
"parameterName" : "ces133" "parameterName" : "ces133"
} ], } ],
"materialRequirements" : null,
"dependentOnOrderIds" : [ ],
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"quantity" : 50000.0,
"execId" : "65ffe1c733cc4a888ca3dcc28a7ab65a", "execId" : "65ffe1c733cc4a888ca3dcc28a7ab65a",
"sequence" : 1, "sequence" : 1,
"equipTypeID" : 1661,
"prevEntryIds" : [ ],
"nextEntryIds" : [ { "nextEntryIds" : [ {
"prevOperationId" : 0, "prevOperationId" : 0,
"nextOperationId" : 2, "nextOperationId" : 2,
"dependencyType" : "FinishToStart", "dependencyType" : "FinishToStart",
"id" : 0 "id" : 0
}, {
"prevOperationId" : 0,
"nextOperationId" : 4,
"dependencyType" : "FinishToStart",
"id" : 0
} ], } ],
"prevEntryIds" : [ ],
"equipTypeID" : 1661,
"machineOptions" : [ { "machineOptions" : [ {
"machineId" : 3403, "machineId" : 3403,
"processingTime" : 0.72, "processingTime" : 0.72,
...@@ -455,9 +553,9 @@ ...@@ -455,9 +553,9 @@
"preTime" : 0 "preTime" : 0
} ], } ],
"selectMachineID" : 3403, "selectMachineID" : 3403,
"latestCompletionTime" : null,
"targetFinishedOperationId" : 0,
"isInterrupt" : true, "isInterrupt" : true,
"targetFinishedOperationId" : 0,
"latestCompletionTime" : null,
"mainId" : null "mainId" : null
}, { }, {
"Id" : 2, "Id" : 2,
...@@ -469,10 +567,10 @@ ...@@ -469,10 +567,10 @@
"routingDetailName" : "30 包装", "routingDetailName" : "30 包装",
"productId" : "cbd0dd08-e92e-f846-8577-c359540fb09a", "productId" : "cbd0dd08-e92e-f846-8577-c359540fb09a",
"ExecId" : "36200a5d39aa43eb956824baa3d7961c", "ExecId" : "36200a5d39aa43eb956824baa3d7961c",
"MainId" : null, "MainId" : "3ab1f4c69ec2463f997a4d63c404ee50",
"DiscreteParameter" : [ ], "DiscreteParameter" : [ ],
"Priority" : 1.0, "Priority" : 1.0,
"Quantity" : 50000.0, "Quantity" : 20000.0,
"Sequence" : 2, "Sequence" : 2,
"MachineOptions" : [ { "MachineOptions" : [ {
"machineId" : 3243, "machineId" : 3243,
...@@ -497,7 +595,7 @@ ...@@ -497,7 +595,7 @@
"id" : 0 "id" : 0
} ], } ],
"NextEntryIds" : [ ], "NextEntryIds" : [ ],
"state" : null, "state" : 1,
"IsInterrupt" : true, "IsInterrupt" : true,
"MaterialRequirements" : null, "MaterialRequirements" : null,
"EquipTypeID" : 1621, "EquipTypeID" : 1621,
...@@ -507,21 +605,21 @@ ...@@ -507,21 +605,21 @@
"priority" : 1.0, "priority" : 1.0,
"id" : 2, "id" : 2,
"groupId" : 1, "groupId" : 1,
"discreteParameter" : [ ],
"materialRequirements" : null,
"dependentOnOrderIds" : [ ], "dependentOnOrderIds" : [ ],
"materialRequirements" : null,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53", "orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"quantity" : 50000.0, "quantity" : 20000.0,
"discreteParameter" : [ ],
"execId" : "36200a5d39aa43eb956824baa3d7961c", "execId" : "36200a5d39aa43eb956824baa3d7961c",
"sequence" : 2, "sequence" : 2,
"equipTypeID" : 1621, "nextEntryIds" : [ ],
"prevEntryIds" : [ { "prevEntryIds" : [ {
"prevOperationId" : 1, "prevOperationId" : 1,
"nextOperationId" : 0, "nextOperationId" : 0,
"dependencyType" : "FinishToStart", "dependencyType" : "FinishToStart",
"id" : 0 "id" : 0
} ], } ],
"nextEntryIds" : [ ], "equipTypeID" : 1621,
"machineOptions" : [ { "machineOptions" : [ {
"machineId" : 3243, "machineId" : 3243,
"processingTime" : 1.2, "processingTime" : 1.2,
...@@ -538,10 +636,10 @@ ...@@ -538,10 +636,10 @@
"preTime" : 0 "preTime" : 0
} ], } ],
"selectMachineID" : 3243, "selectMachineID" : 3243,
"latestCompletionTime" : null,
"targetFinishedOperationId" : 0,
"isInterrupt" : true, "isInterrupt" : true,
"mainId" : null "targetFinishedOperationId" : 0,
"latestCompletionTime" : null,
"mainId" : "3ab1f4c69ec2463f997a4d63c404ee50"
}, { }, {
"Id" : 3, "Id" : 3,
"GroupId" : 2, "GroupId" : 2,
...@@ -578,16 +676,16 @@ ...@@ -578,16 +676,16 @@
"priority" : 1.0, "priority" : 1.0,
"id" : 3, "id" : 3,
"groupId" : 2, "groupId" : 2,
"discreteParameter" : [ ],
"materialRequirements" : null,
"dependentOnOrderIds" : [ ], "dependentOnOrderIds" : [ ],
"materialRequirements" : null,
"orderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f", "orderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f",
"quantity" : 20.0, "quantity" : 20.0,
"discreteParameter" : [ ],
"execId" : "3dbe438ec2714f3d830bb186df914370", "execId" : "3dbe438ec2714f3d830bb186df914370",
"sequence" : 1, "sequence" : 1,
"equipTypeID" : 746,
"prevEntryIds" : [ ],
"nextEntryIds" : [ ], "nextEntryIds" : [ ],
"prevEntryIds" : [ ],
"equipTypeID" : 746,
"machineOptions" : [ { "machineOptions" : [ {
"machineId" : 2183, "machineId" : 2183,
"processingTime" : 3600.0, "processingTime" : 3600.0,
...@@ -597,10 +695,93 @@ ...@@ -597,10 +695,93 @@
"preTime" : 0 "preTime" : 0
} ], } ],
"selectMachineID" : 2183, "selectMachineID" : 2183,
"latestCompletionTime" : null,
"targetFinishedOperationId" : 0,
"isInterrupt" : true, "isInterrupt" : true,
"targetFinishedOperationId" : 0,
"latestCompletionTime" : null,
"mainId" : null "mainId" : null
}, {
"Id" : 4,
"GroupId" : 1,
"OrderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"routingId" : null,
"routingDetailId" : 555854,
"taskSeq" : 10,
"routingDetailName" : "30 包装",
"productId" : "cbd0dd08-e92e-f846-8577-c359540fb09a",
"ExecId" : "b492793a49c947bf81bd33239b4dfbdd",
"MainId" : "3ab1f4c69ec2463f997a4d63c404ee50",
"DiscreteParameter" : [ ],
"Priority" : 1.0,
"Quantity" : 30000.0,
"Sequence" : 3,
"MachineOptions" : [ {
"machineId" : 3243,
"processingTime" : 1.2,
"setupTime" : 0,
"teardownTime" : 0,
"contantTime" : 1,
"preTime" : 0
}, {
"machineId" : 3401,
"processingTime" : 1.2,
"setupTime" : 0,
"teardownTime" : 0,
"contantTime" : 1,
"preTime" : 0
} ],
"SelectMachineID" : 3243,
"PrevEntryIds" : [ {
"prevOperationId" : 1,
"nextOperationId" : 0,
"dependencyType" : "FinishToStart",
"id" : 0
} ],
"NextEntryIds" : [ ],
"state" : 2,
"IsInterrupt" : true,
"MaterialRequirements" : null,
"EquipTypeID" : 1621,
"DependentOnOrderIds" : [ ],
"TargetFinishedOperationId" : 0,
"LatestCompletionTime" : null,
"priority" : 1.0,
"id" : 4,
"groupId" : 1,
"dependentOnOrderIds" : [ ],
"materialRequirements" : null,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"quantity" : 30000.0,
"discreteParameter" : [ ],
"execId" : "b492793a49c947bf81bd33239b4dfbdd",
"sequence" : 3,
"nextEntryIds" : [ ],
"prevEntryIds" : [ {
"prevOperationId" : 1,
"nextOperationId" : 0,
"dependencyType" : "FinishToStart",
"id" : 0
} ],
"equipTypeID" : 1621,
"machineOptions" : [ {
"machineId" : 3243,
"processingTime" : 1.2,
"setupTime" : 0,
"teardownTime" : 0,
"contantTime" : 1,
"preTime" : 0
}, {
"machineId" : 3401,
"processingTime" : 1.2,
"setupTime" : 0,
"teardownTime" : 0,
"contantTime" : 1,
"preTime" : 0
} ],
"selectMachineID" : 3243,
"isInterrupt" : true,
"targetFinishedOperationId" : 0,
"latestCompletionTime" : null,
"mainId" : "3ab1f4c69ec2463f997a4d63c404ee50"
} ], } ],
"orders" : [ { "orders" : [ {
"id" : 0, "id" : 0,
...@@ -661,9 +842,9 @@ ...@@ -661,9 +842,9 @@
"finishOrderId" : null, "finishOrderId" : null,
"syquantity" : 50000.0 "syquantity" : 50000.0
} ], } ],
"machineMaxRate" : 83.33, "machineMaxRate" : 115.38,
"machineMinRate" : 0.0, "machineMinRate" : 0.0,
"machineWaitTime" : 4295.033333333334, "machineWaitTime" : 4285.033333333334,
"orderOnTime" : 100.0, "orderOnTime" : 100.0,
"orderMaxDelay" : 0.0, "orderMaxDelay" : 0.0,
"orderMinDelay" : 0.0, "orderMinDelay" : 0.0,
...@@ -681,26 +862,27 @@ ...@@ -681,26 +862,27 @@
"teardownTime" : 0, "teardownTime" : 0,
"designatedStartTime" : -1, "designatedStartTime" : -1,
"forcedMachineId" : -1, "forcedMachineId" : -1,
"seq" : 0,
"startTime" : 27000, "startTime" : 27000,
"endTime" : 63000, "endTime" : 63000,
"groupId" : 1, "groupId" : 1,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53", "orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"processingTime" : 36000.0,
"quantity" : 50000.0, "quantity" : 50000.0,
"operationId" : 1, "operationId" : 1,
"processingTime" : 36000.0,
"machineId" : 3403,
"changeoverTime" : 0, "changeoverTime" : 0,
"machineId" : 3403,
"execId" : "65ffe1c733cc4a888ca3dcc28a7ab65a", "execId" : "65ffe1c733cc4a888ca3dcc28a7ab65a",
"geneDetails" : [ { "geneDetails" : [ {
"key" : "306c7f03-660d-475a-ada9-97d1fd9fbcf9", "key" : "306c7f03-660d-475a-ada9-97d1fd9fbcf9",
"startTime" : 27000, "startTime" : 27000,
"endTime" : 63000, "endTime" : 63000,
"quantity" : 50000.0,
"processingTime" : 36000, "processingTime" : 36000,
"quantity" : 50000.0,
"oneTime" : 0.72 "oneTime" : 0.72
} ], } ],
"oneTime" : 0.72,
"isLocked" : false, "isLocked" : false,
"oneTime" : 0.72,
"flowTime" : 36000 "flowTime" : 36000
}, { }, {
"ExecId" : "36200a5d39aa43eb956824baa3d7961c", "ExecId" : "36200a5d39aa43eb956824baa3d7961c",
...@@ -709,34 +891,64 @@ ...@@ -709,34 +891,64 @@
"teardownTime" : 0, "teardownTime" : 0,
"designatedStartTime" : -1, "designatedStartTime" : -1,
"forcedMachineId" : -1, "forcedMachineId" : -1,
"seq" : 0,
"startTime" : 63000, "startTime" : 63000,
"endTime" : 137400, "endTime" : 87000,
"groupId" : 1, "groupId" : 1,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53", "orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"quantity" : 50000.0, "processingTime" : 24000.0,
"quantity" : 20000.0,
"operationId" : 2, "operationId" : 2,
"processingTime" : 60000.0,
"machineId" : 3243,
"changeoverTime" : 0, "changeoverTime" : 0,
"machineId" : 3243,
"execId" : "36200a5d39aa43eb956824baa3d7961c", "execId" : "36200a5d39aa43eb956824baa3d7961c",
"geneDetails" : [ { "geneDetails" : [ {
"key" : "80a684a3-74b0-4b87-aea8-c56e0f7f62be", "key" : "6893c2b0-6e12-4674-8ff6-f91b63290d56",
"startTime" : 63000, "startTime" : 63000,
"endTime" : 99000, "endTime" : 87000,
"processingTime" : 24000,
"quantity" : 20000.0,
"oneTime" : 1.2
} ],
"isLocked" : false,
"oneTime" : 1.2,
"flowTime" : 24000
}, {
"ExecId" : "b492793a49c947bf81bd33239b4dfbdd",
"OrderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"productId" : "cbd0dd08-e92e-f846-8577-c359540fb09a",
"teardownTime" : 0,
"designatedStartTime" : -1,
"forcedMachineId" : -1,
"seq" : 0,
"startTime" : 87000,
"endTime" : 137400,
"groupId" : 1,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"processingTime" : 36000.0,
"quantity" : 30000.0, "quantity" : 30000.0,
"processingTime" : 36000, "operationId" : 4,
"changeoverTime" : 0,
"machineId" : 3243,
"execId" : "b492793a49c947bf81bd33239b4dfbdd",
"geneDetails" : [ {
"key" : "80a684a3-74b0-4b87-aea8-c56e0f7f62be",
"startTime" : 87000,
"endTime" : 99000,
"processingTime" : 12000,
"quantity" : 10000.0,
"oneTime" : 1.2 "oneTime" : 1.2
}, { }, {
"key" : "7098f1f3-0f4d-490d-baa0-1d6fa04a3255", "key" : "3716566c-7f85-4425-ae9a-cf1ad5309faf",
"startTime" : 113400, "startTime" : 113400,
"endTime" : 137400, "endTime" : 137400,
"quantity" : 20000.0,
"processingTime" : 24000, "processingTime" : 24000,
"quantity" : 20000.0,
"oneTime" : 1.2 "oneTime" : 1.2
} ], } ],
"oneTime" : 1.2,
"isLocked" : false, "isLocked" : false,
"flowTime" : 74400 "oneTime" : 1.2,
"flowTime" : 50400
}, { }, {
"ExecId" : "3dbe438ec2714f3d830bb186df914370", "ExecId" : "3dbe438ec2714f3d830bb186df914370",
"OrderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f", "OrderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f",
...@@ -744,37 +956,37 @@ ...@@ -744,37 +956,37 @@
"teardownTime" : 0, "teardownTime" : 0,
"designatedStartTime" : -1, "designatedStartTime" : -1,
"forcedMachineId" : -1, "forcedMachineId" : -1,
"seq" : 0,
"startTime" : 27000, "startTime" : 27000,
"endTime" : 149400, "endTime" : 149400,
"groupId" : 2, "groupId" : 2,
"orderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f", "orderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f",
"processingTime" : 72000.0,
"quantity" : 20.0, "quantity" : 20.0,
"operationId" : 3, "operationId" : 3,
"processingTime" : 72000.0,
"machineId" : 2183,
"changeoverTime" : 0, "changeoverTime" : 0,
"machineId" : 2183,
"execId" : "3dbe438ec2714f3d830bb186df914370", "execId" : "3dbe438ec2714f3d830bb186df914370",
"geneDetails" : [ { "geneDetails" : [ {
"key" : "48f10834-a9be-4097-8dca-2a1be5404ddc", "key" : "48f10834-a9be-4097-8dca-2a1be5404ddc",
"startTime" : 27000, "startTime" : 27000,
"endTime" : 63000, "endTime" : 63000,
"quantity" : 10.0,
"processingTime" : 36000, "processingTime" : 36000,
"quantity" : 10.0,
"oneTime" : 3600.0 "oneTime" : 3600.0
}, { }, {
"key" : "936d981f-bd02-4691-a93b-33eb69fc3216", "key" : "936d981f-bd02-4691-a93b-33eb69fc3216",
"startTime" : 113400, "startTime" : 113400,
"endTime" : 149400, "endTime" : 149400,
"quantity" : 10.0,
"processingTime" : 36000, "processingTime" : 36000,
"quantity" : 10.0,
"oneTime" : 3600.0 "oneTime" : 3600.0
} ], } ],
"oneTime" : 3600.0,
"isLocked" : false, "isLocked" : false,
"oneTime" : 3600.0,
"flowTime" : 122400 "flowTime" : 122400
} ], } ],
"id" : "e8e060fa-c33d-43ff-90a4-3f28824eb085", "id" : "e8e060fa-c33d-43ff-90a4-3f28824eb085",
"baseTime" : "2025-11-01T00:00:00",
"machines" : [ { "machines" : [ {
"id" : 2183, "id" : 2183,
"name" : null, "name" : null,
...@@ -1356,9 +1568,10 @@ ...@@ -1356,9 +1568,10 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 72000.0, "actualWorkTime" : 72000.0,
"rate" : 83.33, "rate" : 115.38,
"shiftsChanged" : null, "shiftsChanged" : null,
"maintenanceWindowsChanged" : null "maintenanceWindowsChanged" : null
}, { }, {
...@@ -1393,8 +1606,17 @@ ...@@ -1393,8 +1606,17 @@
} ], } ],
"maintenanceWindows" : [ ], "maintenanceWindows" : [ ],
"availability" : [ { "availability" : [ {
"key" : "6893c2b0-6e12-4674-8ff6-f91b63290d56",
"start" : "2025-11-01T17:30:00",
"end" : "2025-11-02T00:10:00",
"earliestTime" : 0,
"totalTaskTime" : 0,
"type" : "REGULAR",
"used" : true,
"holiday" : false
}, {
"key" : "80a684a3-74b0-4b87-aea8-c56e0f7f62be", "key" : "80a684a3-74b0-4b87-aea8-c56e0f7f62be",
"start" : "2025-11-01T07:30:00", "start" : "2025-11-02T00:10:00",
"end" : "2025-11-02T03:30:00", "end" : "2025-11-02T03:30:00",
"earliestTime" : 0, "earliestTime" : 0,
"totalTaskTime" : 0, "totalTaskTime" : 0,
...@@ -1402,7 +1624,7 @@ ...@@ -1402,7 +1624,7 @@
"used" : true, "used" : true,
"holiday" : false "holiday" : false
}, { }, {
"key" : "7098f1f3-0f4d-490d-baa0-1d6fa04a3255", "key" : "3716566c-7f85-4425-ae9a-cf1ad5309faf",
"start" : "2025-11-02T07:30:00", "start" : "2025-11-02T07:30:00",
"end" : "2025-11-02T14:10:00", "end" : "2025-11-02T14:10:00",
"earliestTime" : 0, "earliestTime" : 0,
...@@ -1951,9 +2173,10 @@ ...@@ -1951,9 +2173,10 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 60000.0, "actualWorkTime" : 60000.0,
"rate" : 69.44, "rate" : 96.15,
"shiftsChanged" : null, "shiftsChanged" : null,
"maintenanceWindowsChanged" : null "maintenanceWindowsChanged" : null
}, { }, {
...@@ -2537,6 +2760,7 @@ ...@@ -2537,6 +2760,7 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 0.0, "actualWorkTime" : 0.0,
"rate" : 0.0, "rate" : 0.0,
...@@ -3123,6 +3347,7 @@ ...@@ -3123,6 +3347,7 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 0.0, "actualWorkTime" : 0.0,
"rate" : 0.0, "rate" : 0.0,
...@@ -3709,32 +3934,41 @@ ...@@ -3709,32 +3934,41 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 36000.0, "actualWorkTime" : 36000.0,
"rate" : 41.67, "rate" : 57.69,
"shiftsChanged" : null, "shiftsChanged" : null,
"maintenanceWindowsChanged" : null "maintenanceWindowsChanged" : null
} ], } ],
"baseTime" : "2025-11-01T00:00:00",
"scenarioID" : "B571EF6682DB463AB2977B1055A74112", "scenarioID" : "B571EF6682DB463AB2977B1055A74112",
"totalChangeoverTime" : 0.0, "totalChangeoverTime" : 0.0,
"makespan" : 149400.0, "operationStr" : "1|1|1|2",
"operatRel" : [ { "operatRel" : [ {
"nodeInfoList" : [ { "nodeInfoList" : [ {
"originalId" : "65ffe1c733cc4a888ca3dcc28a7ab65a", "originalId" : "65ffe1c733cc4a888ca3dcc28a7ab65a",
"globalSerial" : 1, "globalSerial" : 1,
"groupSerial" : 1, "groupSerial" : 1,
"newParentIds" : [ ], "newParentIds" : [ ],
"newChildIds" : [ 2 ] "newChildIds" : [ 2, 4 ]
}, { }, {
"originalId" : "36200a5d39aa43eb956824baa3d7961c", "originalId" : "36200a5d39aa43eb956824baa3d7961c",
"globalSerial" : 2, "globalSerial" : 2,
"groupSerial" : 2, "groupSerial" : 2,
"newParentIds" : [ 1 ], "newParentIds" : [ 1 ],
"newChildIds" : [ ] "newChildIds" : [ ]
}, {
"originalId" : "b492793a49c947bf81bd33239b4dfbdd",
"globalSerial" : 4,
"groupSerial" : 3,
"newParentIds" : [ 1 ],
"newChildIds" : [ ]
} ], } ],
"originalToGlobalSerial" : { "originalToGlobalSerial" : {
"36200a5d39aa43eb956824baa3d7961c" : 2, "36200a5d39aa43eb956824baa3d7961c" : 2,
"65ffe1c733cc4a888ca3dcc28a7ab65a" : 1 "65ffe1c733cc4a888ca3dcc28a7ab65a" : 1,
"b492793a49c947bf81bd33239b4dfbdd" : 4
} }
}, { }, {
"nodeInfoList" : [ { "nodeInfoList" : [ {
...@@ -3748,16 +3982,16 @@ ...@@ -3748,16 +3982,16 @@
"3dbe438ec2714f3d830bb186df914370" : 3 "3dbe438ec2714f3d830bb186df914370" : 3
} }
} ], } ],
"operationStr" : "1|1|2",
"totalFlowTime" : 232800.0,
"fitness" : 0.4820972833156857, "fitness" : 0.4820972833156857,
"delayTime" : 0.0, "delayTime" : 0.0,
"totalFlowTime" : 232800.0,
"machineLoadStd" : 0.9104720809707942, "machineLoadStd" : 0.9104720809707942,
"weightedObjective" : 0.0, "makespan" : 149400.0,
"machineSelection" : [ 1, 1, 1 ], "machineSelection" : [ 1, 1, 1, 1 ],
"operationSequencing" : [ 1, 1, 2 ], "operationSequencing" : [ 1, 1, 1, 2 ],
"crowdingDistance" : "Infinity", "crowdingDistance" : "Infinity",
"rank" : 0, "weightedObjective" : 0.0,
"machineStr" : "1,1,1,1",
"initMachines" : [ { "initMachines" : [ {
"id" : 2183, "id" : 2183,
"name" : null, "name" : null,
...@@ -3796,7 +4030,7 @@ ...@@ -3796,7 +4030,7 @@
"earliestTime" : 0, "earliestTime" : 0,
"totalTaskTime" : 0, "totalTaskTime" : 0,
"type" : "REGULAR", "type" : "REGULAR",
"used" : false, "used" : true,
"holiday" : false "holiday" : false
}, { }, {
"key" : "936d981f-bd02-4691-a93b-33eb69fc3216", "key" : "936d981f-bd02-4691-a93b-33eb69fc3216",
...@@ -3805,7 +4039,7 @@ ...@@ -3805,7 +4039,7 @@
"earliestTime" : 0, "earliestTime" : 0,
"totalTaskTime" : 0, "totalTaskTime" : 0,
"type" : "REGULAR", "type" : "REGULAR",
"used" : false, "used" : true,
"holiday" : false "holiday" : false
}, { }, {
"key" : "a97c4750-faab-4799-8c36-775522070aef", "key" : "a97c4750-faab-4799-8c36-775522070aef",
...@@ -4339,9 +4573,10 @@ ...@@ -4339,9 +4573,10 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 0.0, "actualWorkTime" : 72000.0,
"rate" : 0.0, "rate" : 115.38,
"shiftsChanged" : null, "shiftsChanged" : null,
"maintenanceWindowsChanged" : null "maintenanceWindowsChanged" : null
}, { }, {
...@@ -4376,17 +4611,35 @@ ...@@ -4376,17 +4611,35 @@
} ], } ],
"maintenanceWindows" : [ ], "maintenanceWindows" : [ ],
"availability" : [ { "availability" : [ {
"key" : "6893c2b0-6e12-4674-8ff6-f91b63290d56",
"start" : "2025-11-01T17:30:00",
"end" : "2025-11-02T00:10:00",
"earliestTime" : 0,
"totalTaskTime" : 0,
"type" : "REGULAR",
"used" : true,
"holiday" : false
}, {
"key" : "80a684a3-74b0-4b87-aea8-c56e0f7f62be", "key" : "80a684a3-74b0-4b87-aea8-c56e0f7f62be",
"start" : "2025-11-01T07:30:00", "start" : "2025-11-02T00:10:00",
"end" : "2025-11-02T03:30:00", "end" : "2025-11-02T03:30:00",
"earliestTime" : 0, "earliestTime" : 0,
"totalTaskTime" : 0, "totalTaskTime" : 0,
"type" : "REGULAR", "type" : "REGULAR",
"used" : false, "used" : true,
"holiday" : false "holiday" : false
}, { }, {
"key" : "721f79db-04a4-4c0f-bcd0-330c02265f25", "key" : "3716566c-7f85-4425-ae9a-cf1ad5309faf",
"start" : "2025-11-02T07:30:00", "start" : "2025-11-02T07:30:00",
"end" : "2025-11-02T14:10:00",
"earliestTime" : 0,
"totalTaskTime" : 0,
"type" : "REGULAR",
"used" : true,
"holiday" : false
}, {
"key" : "721f79db-04a4-4c0f-bcd0-330c02265f25",
"start" : "2025-11-02T14:10:00",
"end" : "2025-11-03T03:30:00", "end" : "2025-11-03T03:30:00",
"earliestTime" : 0, "earliestTime" : 0,
"totalTaskTime" : 0, "totalTaskTime" : 0,
...@@ -4925,9 +5178,10 @@ ...@@ -4925,9 +5178,10 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 0.0, "actualWorkTime" : 60000.0,
"rate" : 0.0, "rate" : 96.15,
"shiftsChanged" : null, "shiftsChanged" : null,
"maintenanceWindowsChanged" : null "maintenanceWindowsChanged" : null
}, { }, {
...@@ -5511,6 +5765,7 @@ ...@@ -5511,6 +5765,7 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 0.0, "actualWorkTime" : 0.0,
"rate" : 0.0, "rate" : 0.0,
...@@ -6097,6 +6352,7 @@ ...@@ -6097,6 +6352,7 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 0.0, "actualWorkTime" : 0.0,
"rate" : 0.0, "rate" : 0.0,
...@@ -6140,7 +6396,7 @@ ...@@ -6140,7 +6396,7 @@
"earliestTime" : 0, "earliestTime" : 0,
"totalTaskTime" : 0, "totalTaskTime" : 0,
"type" : "REGULAR", "type" : "REGULAR",
"used" : false, "used" : true,
"holiday" : false "holiday" : false
}, { }, {
"key" : "f64e0997-b4cc-4316-bb99-aed6409e316d", "key" : "f64e0997-b4cc-4316-bb99-aed6409e316d",
...@@ -6683,14 +6939,116 @@ ...@@ -6683,14 +6939,116 @@
"used" : false, "used" : false,
"holiday" : false "holiday" : false
} ], } ],
"code" : null,
"holidays" : [ ], "holidays" : [ ],
"actualWorkTime" : 0.0, "actualWorkTime" : 36000.0,
"rate" : 0.0, "rate" : 57.69,
"shiftsChanged" : null, "shiftsChanged" : null,
"maintenanceWindowsChanged" : null "maintenanceWindowsChanged" : null
} ], } ],
"objectives" : [ 149400.0, 232800.0, 0.0, 0.9104720809707942, 0.0 ], "objectives" : [ 149400.0, 232800.0, 0.0, 0.9104720809707942, 0.0 ],
"resultOld" : [ ],
"scenarioName" : null, "scenarioName" : null,
"machineStr" : "1,1,1" "rank" : 0,
"resultOld" : [ {
"ExecId" : "65ffe1c733cc4a888ca3dcc28a7ab65a",
"OrderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"productId" : "cbd0dd08-e92e-f846-8577-c359540fb09a",
"teardownTime" : 0,
"designatedStartTime" : -1,
"forcedMachineId" : -1,
"seq" : 0,
"startTime" : 27000,
"endTime" : 63000,
"groupId" : 1,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"processingTime" : 36000.0,
"quantity" : 50000.0,
"operationId" : 1,
"changeoverTime" : 0,
"machineId" : 3403,
"execId" : "65ffe1c733cc4a888ca3dcc28a7ab65a",
"geneDetails" : [ {
"key" : "306c7f03-660d-475a-ada9-97d1fd9fbcf9",
"startTime" : 27000,
"endTime" : 63000,
"processingTime" : 36000,
"quantity" : 50000.0,
"oneTime" : 0.72
} ],
"isLocked" : false,
"oneTime" : 0.72,
"flowTime" : 36000
}, {
"ExecId" : "36200a5d39aa43eb956824baa3d7961c",
"OrderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"productId" : "cbd0dd08-e92e-f846-8577-c359540fb09a",
"teardownTime" : 0,
"designatedStartTime" : -1,
"forcedMachineId" : -1,
"seq" : 0,
"startTime" : 63000,
"endTime" : 137400,
"groupId" : 1,
"orderId" : "fcc0892a-0483-4da7-8414-9ce98be36e53",
"processingTime" : 60000.0,
"quantity" : 50000.0,
"operationId" : 2,
"changeoverTime" : 0,
"machineId" : 3243,
"execId" : "36200a5d39aa43eb956824baa3d7961c",
"geneDetails" : [ {
"key" : "80a684a3-74b0-4b87-aea8-c56e0f7f62be",
"startTime" : 63000,
"endTime" : 99000,
"processingTime" : 36000,
"quantity" : 30000.0,
"oneTime" : 1.2
}, {
"key" : "7098f1f3-0f4d-490d-baa0-1d6fa04a3255",
"startTime" : 113400,
"endTime" : 137400,
"processingTime" : 24000,
"quantity" : 20000.0,
"oneTime" : 1.2
} ],
"isLocked" : false,
"oneTime" : 1.2,
"flowTime" : 74400
}, {
"ExecId" : "3dbe438ec2714f3d830bb186df914370",
"OrderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f",
"productId" : "d5d0dd08-e3b6-c94c-8073-bad6ae137269",
"teardownTime" : 0,
"designatedStartTime" : -1,
"forcedMachineId" : -1,
"seq" : 0,
"startTime" : 27000,
"endTime" : 149400,
"groupId" : 2,
"orderId" : "14a5bbda-bcf6-41d1-a342-bb07c2d41b4f",
"processingTime" : 72000.0,
"quantity" : 20.0,
"operationId" : 3,
"changeoverTime" : 0,
"machineId" : 2183,
"execId" : "3dbe438ec2714f3d830bb186df914370",
"geneDetails" : [ {
"key" : "48f10834-a9be-4097-8dca-2a1be5404ddc",
"startTime" : 27000,
"endTime" : 63000,
"processingTime" : 36000,
"quantity" : 10.0,
"oneTime" : 3600.0
}, {
"key" : "936d981f-bd02-4691-a93b-33eb69fc3216",
"startTime" : 113400,
"endTime" : 149400,
"processingTime" : 36000,
"quantity" : 10.0,
"oneTime" : 3600.0
} ],
"isLocked" : false,
"oneTime" : 3600.0,
"flowTime" : 122400
} ]
} }
\ No newline at end of file
...@@ -93,6 +93,27 @@ public class ParamValidator { ...@@ -93,6 +93,27 @@ public class ParamValidator {
} }
} }
public static Double getDouble(Map<String, Object> params, String key, String fieldName) {
Object value = params.get(key);
requireNonNull(value, fieldName);
try {
if (value instanceof Number) {
return ((Number) value).doubleValue();
} else if (value instanceof String) {
String str = ((String) value).trim();
if (str.isEmpty()) {
throw new IllegalArgumentException(fieldName + "不能为空字符串");
}
return Double.parseDouble(str);
} else {
throw new IllegalArgumentException(fieldName + "格式不正确,必须是数字或字符串");
}
} catch (NumberFormatException e) {
throw new IllegalArgumentException(fieldName + "格式不正确: " + value);
}
}
public static Long getLong(Map<String, Object> params, String key, String fieldName) { public static Long getLong(Map<String, Object> params, String key, String fieldName) {
Object value = params.get(key); Object value = params.get(key);
requireNonNull(value, fieldName); requireNonNull(value, fieldName);
......
...@@ -140,7 +140,7 @@ public class ResourceGanttController { ...@@ -140,7 +140,7 @@ public class ResourceGanttController {
@PostMapping("/operationMove") @PostMapping("/operationMove")
@Operation(summary = "操作移动", description = "操作移动") @Operation(summary = "操作移动", description = "操作移动")
public R<Chromosome> operationMove(@RequestBody Map<String, Object> params) { public R<String> operationMove(@RequestBody Map<String, Object> params) {
// 1. 提取参数 // 1. 提取参数
String sceneId = ParamValidator.getString(params, "sceneId", "场景ID"); String sceneId = ParamValidator.getString(params, "sceneId", "场景ID");
...@@ -154,7 +154,7 @@ public class ResourceGanttController { ...@@ -154,7 +154,7 @@ public class ResourceGanttController {
// 3. 执行业务 // 3. 执行业务
Chromosome result = planResultService.Move(sceneId, opid, newStartTime, newMachineId); Chromosome result = planResultService.Move(sceneId, opid, newStartTime, newMachineId);
return R.ok(result); return R.ok("移动成功");
} }
@PostMapping("/operationedit") @PostMapping("/operationedit")
...@@ -175,7 +175,7 @@ public class ResourceGanttController { ...@@ -175,7 +175,7 @@ public class ResourceGanttController {
@PostMapping("/changebasetime") @PostMapping("/changebasetime")
@Operation(summary = "修改基础时间", description = "修改基础时间") @Operation(summary = "修改基础时间", description = "修改基础时间")
public R<Chromosome> changeBaseTime(@RequestBody Map<String, Object> params) { public R<String> changeBaseTime(@RequestBody Map<String, Object> params) {
log.info("changeBaseTime 请求参数: {}", params); log.info("changeBaseTime 请求参数: {}", params);
String sceneId = ParamValidator.getString(params, "sceneId", "场景ID"); String sceneId = ParamValidator.getString(params, "sceneId", "场景ID");
...@@ -183,12 +183,12 @@ public class ResourceGanttController { ...@@ -183,12 +183,12 @@ public class ResourceGanttController {
ParamValidator.validateSceneExists(sceneService, sceneId); ParamValidator.validateSceneExists(sceneService, sceneId);
Chromosome result = planResultService.ChangeBaseTime(sceneId, baseTime); Chromosome result = planResultService.ChangeBaseTime(sceneId, baseTime);
return R.ok(result); return R.ok("保存成功");
} }
@PostMapping("/operationspilt") @PostMapping("/operationspilt")
@Operation(summary = "工单拆分", description = "工单拆分") @Operation(summary = "工单拆分", description = "工单拆分")
public R<Chromosome> spiltOperation(@RequestBody Map<String, Object> params) { public R<String> spiltOperation(@RequestBody Map<String, Object> params) {
log.info("spiltOperation 请求参数: {}", params); log.info("spiltOperation 请求参数: {}", params);
String sceneId = ParamValidator.getString(params, "sceneId", "场景ID"); String sceneId = ParamValidator.getString(params, "sceneId", "场景ID");
...@@ -200,12 +200,15 @@ public class ResourceGanttController { ...@@ -200,12 +200,15 @@ public class ResourceGanttController {
ParamValidator.validateSceneExists(sceneService, sceneId); ParamValidator.validateSceneExists(sceneService, sceneId);
Chromosome result = planResultService.SpiltOperation(sceneId, opid, splitCountsArray); Chromosome result = planResultService.SpiltOperation(sceneId, opid, splitCountsArray);
return R.ok(result); return R.ok("拆分成功");
} }
@PostMapping("/operationdel") @PostMapping("/operationdel")
@Operation(summary = "删除工单", description = "删除工单") @Operation(summary = "删除工单", description = "删除工单")
public R<Chromosome> delOperation(@RequestBody Map<String, Object> params) { public R<String> delOperation(@RequestBody Map<String, Object> params) {
log.info("delOperation 请求参数: {}", params); log.info("delOperation 请求参数: {}", params);
String sceneId = ParamValidator.getString(params, "sceneId", "场景ID"); String sceneId = ParamValidator.getString(params, "sceneId", "场景ID");
...@@ -213,12 +216,12 @@ public class ResourceGanttController { ...@@ -213,12 +216,12 @@ public class ResourceGanttController {
ParamValidator.validateSceneExists(sceneService, sceneId); ParamValidator.validateSceneExists(sceneService, sceneId);
Chromosome result = planResultService.DelOperation(sceneId, opid); Chromosome result = planResultService.DelOperation(sceneId, opid);
return R.ok(result); return R.ok("删除成功");
} }
@PostMapping("/operationlocked") @PostMapping("/operationlocked")
@Operation(summary = "工单锁定", description = "订工单锁定") @Operation(summary = "工单锁定", description = "订工单锁定")
public R<Chromosome> lockedOperation(@RequestBody Map<String, Object> params) { public R<String> lockedOperation(@RequestBody Map<String, Object> params) {
log.info("lockedOperation 请求参数: {}", params); log.info("lockedOperation 请求参数: {}", params);
String sceneId = ParamValidator.getString(params, "sceneId", "场景ID"); String sceneId = ParamValidator.getString(params, "sceneId", "场景ID");
...@@ -227,12 +230,12 @@ public class ResourceGanttController { ...@@ -227,12 +230,12 @@ public class ResourceGanttController {
ParamValidator.validateSceneExists(sceneService, sceneId); ParamValidator.validateSceneExists(sceneService, sceneId);
Chromosome result = planResultService.LockOperation(sceneId, opid, isLocked); Chromosome result = planResultService.LockOperation(sceneId, opid, isLocked);
return R.ok(result); return R.ok("锁定成功");
} }
@PostMapping("/orderspilt") @PostMapping("/orderspilt")
@Operation(summary = "订单拆分", description = "订单拆分") @Operation(summary = "订单拆分", description = "订单拆分")
public R<Chromosome> spiltOrder(@RequestBody Map<String, Object> params) { public R<String> spiltOrder(@RequestBody Map<String, Object> params) {
log.info("spiltOrder 请求参数: {}", params); log.info("spiltOrder 请求参数: {}", params);
String sceneId = ParamValidator.getString(params, "sceneId", "场景ID"); String sceneId = ParamValidator.getString(params, "sceneId", "场景ID");
...@@ -243,12 +246,39 @@ public class ResourceGanttController { ...@@ -243,12 +246,39 @@ public class ResourceGanttController {
ParamValidator.validateSceneExists(sceneService, sceneId); ParamValidator.validateSceneExists(sceneService, sceneId);
Chromosome result = planResultService.SpiltOrder(sceneId, orderid, splitCountsArray); Chromosome result = planResultService.SpiltOrder(sceneId, orderid, splitCountsArray);
return R.ok(result); return R.ok("拆分成功");
} }
@PostMapping("/orderCopy")
@Operation(summary = "订单复制", description = "订单复制")
public R<String> copyOrder(@RequestBody Map<String, Object> params) {
log.info("copyOrder 请求参数: {}", params);
String sceneId = ParamValidator.getString(params, "sceneId", "场景ID");
String orderid = ParamValidator.getString(params, "orderId", "订单ID");
Double copyCount = ParamValidator.getDouble(params, "copyCount", "复制数量");
Double[] splitCountsArray = new Double[2]; // 创建一个空的Double数组,可以根据实际需求调整大小或初始化值
splitCountsArray[0] = 0.0;
splitCountsArray[1] = copyCount;
ParamValidator.validateSceneExists(sceneService, sceneId);
Chromosome result = planResultService.SpiltOrder(sceneId, orderid, splitCountsArray);
return R.ok("复制成功");
}
@PostMapping("/ordermerge") @PostMapping("/ordermerge")
@Operation(summary = "订单合并", description = "订单合并") @Operation(summary = "订单合并", description = "订单合并")
public R<Chromosome> orderMerge(@RequestBody Map<String, Object> params) { public R<String> orderMerge(@RequestBody Map<String, Object> params) {
log.info("orderMerge 请求参数: {}", params); log.info("orderMerge 请求参数: {}", params);
String sceneId = ParamValidator.getString(params, "sceneId", "场景ID"); String sceneId = ParamValidator.getString(params, "sceneId", "场景ID");
...@@ -257,7 +287,7 @@ public class ResourceGanttController { ...@@ -257,7 +287,7 @@ public class ResourceGanttController {
ParamValidator.validateSceneExists(sceneService, sceneId); ParamValidator.validateSceneExists(sceneService, sceneId);
Chromosome result = planResultService.MergeOrder(sceneId, sourceorderid, targetorderid); Chromosome result = planResultService.MergeOrder(sceneId, sourceorderid, targetorderid);
return R.ok(result); return R.ok("合并成功");
} }
/** /**
...@@ -472,36 +502,6 @@ public class ResourceGanttController { ...@@ -472,36 +502,6 @@ public class ResourceGanttController {
//
// @GetMapping("/productGantt")
// @Operation(summary = "获取资源甘特图数据", description = "获取资源甘特图数据")
// public List<ProductGanttVO> getProductGantt(@RequestParam String sceneId) {
// // 从PlanResultService获取ScheduleChromosome列表
// Chromosome schedule = sceneService.loadChromosomeFromFile(sceneId);
//
// // 转换为 ResourceGanttVO 格式
// List<ProductGanttVO> productGanttVOList= new ArrayList<>();
// List<ProductGanttVO> resourceGanttVOs = convertToProductGanttVO1(schedule);
// productGanttVOList.addAll(resourceGanttVOs);
//
// return productGanttVOList;
// }
//
//
// @GetMapping("/resourceGantt")
// @Operation(summary = "获取资源甘特图数据", description = "获取资源甘特图数据")
// public List<ResourceGanttVO> getResourceGantt(@RequestParam String sceneId) {
// // 从PlanResultService获取ScheduleChromosome列表
// Chromosome schedule = sceneService.loadChromosomeFromFile(sceneId);
//
// // 转换为 ResourceGanttVO 格式
// List<ResourceGanttVO> resourceGanttVOList = new ArrayList<>();
// List<ResourceGanttVO> resourceGanttVOs = convertToResourceGanttVO1(schedule);
// resourceGanttVOList.addAll(resourceGanttVOs);
//
// return resourceGanttVOList;
// }
......
...@@ -300,12 +300,7 @@ public class RoutingDataService { ...@@ -300,12 +300,7 @@ public class RoutingDataService {
if(PlanResources1!=null&&PlanResources1.size()>0) if(PlanResources1!=null&&PlanResources1.size()>0)
{ {
for (PlanResource PlanResource : PlanResources1) { for (PlanResource PlanResource : PlanResources1) {
machine.setCode(PlanResource.getCode());
machine.setName(PlanResource.getTitle());
if(PlanResource.getWorkSchedId()==null)
{
continue;
}
List<MesShiftWorkSched> ShiftWorkScheds = MesShiftWorkScheds.stream() List<MesShiftWorkSched> ShiftWorkScheds = MesShiftWorkScheds.stream()
.filter(t -> (long) t.getWeekWorkSchedId() == PlanResource.getWorkSchedId()) .filter(t -> (long) t.getWeekWorkSchedId() == PlanResource.getWorkSchedId())
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -320,14 +315,7 @@ public class RoutingDataService { ...@@ -320,14 +315,7 @@ public class RoutingDataService {
} }
} }
if(shifts1.size()==0)
{
throw new RuntimeException(String.format(
"设备%s没有设置日历",
machine.getCode()+":"+machine.getName()));
}
machine.setShifts(shifts1); machine.setShifts(shifts1);
List<ProdEquipSpecialCal> Holidays = ProdEquipSpecialCals.stream() List<ProdEquipSpecialCal> Holidays = ProdEquipSpecialCals.stream()
......
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