工单供给关系

parent 35468cd2
...@@ -878,7 +878,7 @@ public class ResourceGanttController { ...@@ -878,7 +878,7 @@ public class ResourceGanttController {
// 提取参数 // 提取参数
String sceneId = ParamValidator.getString(params, "sceneId", "场景ID"); String sceneId = ParamValidator.getString(params, "sceneId", "场景ID");
Integer entryId = ParamValidator.getInteger(params, "entryId", "工序ID"); Integer entryId = ParamValidator.getInteger(params, "entryId", "工序ID");
ParamValidator.validateSceneExists(sceneService, sceneId); // ParamValidator.validateSceneExists(sceneService, sceneId);
// 调用服务获取供给关系 // 调用服务获取供给关系
List<Object> data = planResultService.getSupplyRelation(sceneId, entryId, sceneService); List<Object> data = planResultService.getSupplyRelation(sceneId, entryId, sceneService);
......
...@@ -1356,7 +1356,23 @@ private GlobalParam InitGlobalParam() ...@@ -1356,7 +1356,23 @@ private GlobalParam InitGlobalParam()
public List<Object> getSupplyRelation(String sceneId, Integer entryId, SceneService sceneService) { public List<Object> getSupplyRelation(String sceneId, Integer entryId, SceneService sceneService) {
List<Object> supplyRelations = new ArrayList<>(); List<Object> supplyRelations = new ArrayList<>();
try { try {
SceneChromsome sceneChromsome=new SceneChromsome();
sceneChromsome.setSceneID(sceneId);
sceneChromsome.setVersion(15);
redisUtils.set("SceneId."+sceneId,sceneChromsome);
SceneChromsome sceneChromsome1=(SceneChromsome)redisUtils.get("SceneId."+sceneId);
Chromosome chromosome = sceneService.loadChromosomeFromFile(sceneId); Chromosome chromosome = sceneService.loadChromosomeFromFile(sceneId);
if (chromosome == null || chromosome.getAllOperations() == null) return supplyRelations; if (chromosome == null || chromosome.getAllOperations() == null) return supplyRelations;
List<Entry> entries = chromosome.getAllOperations(); List<Entry> entries = chromosome.getAllOperations();
List<Order> orders = chromosome.getOrders(); List<Order> orders = chromosome.getOrders();
...@@ -1432,11 +1448,7 @@ private GlobalParam InitGlobalParam() ...@@ -1432,11 +1448,7 @@ private GlobalParam InitGlobalParam()
} }
} }
} }
// 添加from和to对象结构
Map<String, Object> item2 = new HashMap<>();
item2.put("from", new HashMap<>());
item2.put("to", new HashMap<>());
supplyRelations.add(item2);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("获取供给关系失败: {}", e.getMessage(), e); log.error("获取供给关系失败: {}", e.getMessage(), e);
......
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