场景创建修改bug

parent baeaecee
package com.aps.entity.Algorithm;
import com.fasterxml.jackson.annotation.JsonCreator;
import lombok.Data;
/**
......@@ -12,4 +13,15 @@ public class OperationDependency {
private int prevOperationId ; // 前置工序ID
private int nextOperationId ; // 后继工序ID
private DependencyType dependencyType=DependencyType.FinishToStart ; // 依赖类型
/**
* 添加构造函数以便Jackson能正确反序列化
* 当JSON中只有单一数值时,将其作为Id字段的值
*/
@JsonCreator
public static OperationDependency fromInt(int id) {
OperationDependency od = new OperationDependency();
od.Id = id;
return od;
}
}
......@@ -37,6 +37,7 @@ public class ProdEquipSpecialCalServiceImpl extends ServiceImpl<ProdEquipSpecial
List<EquipCapacityDef> activeCapacityDefs = equipCapacityDefService.lambdaQuery()
.eq(EquipCapacityDef::getIsDeleted, 0)
.isNotNull(EquipCapacityDef::getReferenceId)
.isNotNull(EquipCapacityDef::getEquipId) // 过滤掉 equipId 为 null 的记录
.list();
// 转换对象并设置必要字段
......
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