工序表加工艺id

parent 640bf25c
......@@ -14,7 +14,7 @@ public class ProdLaunchOrder {
@TableId(value = "order_id", type = IdType.NONE)
private String orderId;
private String sceneId;
private String routingId;
private Integer routingId;
private String serie;
private String createUser;
private String productType;
......
......@@ -91,4 +91,9 @@ public class ProdProcessExec {
*/
private String connectPropertyName;
private Integer routingId;
private String routingCode;
}
\ No newline at end of file
......@@ -2,8 +2,11 @@ package com.aps.service.Algorithm;
import com.aps.common.util.ProductionDeepCopyUtil;
import com.aps.entity.Algorithm.*;
import com.aps.entity.DiscreteParameterDuration;
import com.aps.entity.ProdEquipment;
import com.aps.entity.basic.*;
import com.aps.service.DiscreteParameterDurationService;
import com.aps.service.DiscreteParameterMatrixService;
import com.aps.service.plan.MachineSchedulerService;
import org.springframework.http.server.DelegatingServerHttpResponse;
......@@ -33,6 +36,8 @@ public class GeneticDecoder {
private List<Entry> _allOperations;
private GlobalParam _globalParam;
private MachineCalculator machineCalculator;
private DiscreteParameterMatrixService discreteParameterMatrixService;
public GeneticDecoder(GlobalParam globalParam,LocalDateTime baseTime, List<Machine> machines, List<Order> orders,
List<Material> materials, MachineSchedulerService machineScheduler) {
this.baseTime = baseTime;
......@@ -259,6 +264,11 @@ public class GeneticDecoder {
if (lastGeneOnMachine != null) {
// 设备上已有任务,当前任务必须在设备可用后开始
// 设备可用时间 = 前一个任务的主处理结束时间(后处理不占用设备)
int machineAvailableTime = lastGeneOnMachine.getEndTime();
if (setupTime > 0) {
......@@ -650,8 +660,10 @@ public class GeneticDecoder {
// prev.getDiscreteParameter()
setupTime = (prev.getProductId() != operation.getProductId())
? machineOption.getSetupTime()
? (int) discreteParameterMatrixService.getDiscreteParameterMatrixValue(prev, operation)
: 0;
if (setupTime > 0) {
System.out.println("设备 " + machine.getId() + " 需要换型,因为产品从 " + prev.getProductId() + " 变更为 " + operation.getProductId());
}
......
......@@ -358,7 +358,7 @@ public class LanuchServiceImpl implements LanuchService {
}
if (routingHeader != null) {
launchOrder.setRoutingId(routingHeader.getId().toString());
launchOrder.setRoutingId(routingHeader.getId());
launchOrder.setRoutingCode(defaultIfBlank(routingHeader.getCode(), ""));
}
}
......@@ -610,7 +610,7 @@ public class LanuchServiceImpl implements LanuchService {
◦ @return 工艺信息
*/
private RoutingHeader getRoutingHeader(String routingId) {
private RoutingHeader getRoutingHeader(Integer routingId) {
LambdaQueryWrapper<RoutingHeader> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(RoutingHeader::getId, routingId)
.eq(RoutingHeader::getIsDeleted, 0); // 添加 is_deleted=0 过滤条件
......@@ -725,7 +725,8 @@ public class LanuchServiceImpl implements LanuchService {
prodProcessExec.setConnectProperty(detail.getConnectProperty());
prodProcessExec.setRoutingId(prodOrderMain.getRoutingId());
prodProcessExec.setRoutingCode(prodOrderMain.getRoutingCode());
prodProcessExec.setConnectPropertyName(detail.getConnectPropertyName());
......
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