优化启动流程

parent 8c0d97a7
package com.aps.controller;
import com.aps.common.util.R;
import com.aps.service.LanuchService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/lanuch")
@Tag(name = "启动工单", description = "启动工单接口")
public class LanuchController {
@Autowired
private LanuchService lanuchService;
/**
* 启动工单
*
* @param sceneName 场景名称
* @param username 用户名
* @return 处理结果
*/
@PostMapping("/execute")
public R<String> lanuch(
@RequestParam String sceneName,
@RequestHeader(required = false) String username) {
if (username == null || username.isEmpty()) {
username = "system";
}
return lanuchService.lanuch(sceneName, username);
}
}
\ No newline at end of file
......@@ -23,7 +23,7 @@ public class ProdLaunchOrder {
private LocalDateTime startDate;
private LocalDateTime endDate;
private String orderDesc;
private String orderPriority;
private Integer orderPriority;
private String groupCode;
private String colorCode;
private BigDecimal quantity;
......
......@@ -6,7 +6,7 @@ import lombok.Data;
public class ProdOrderProcess {
private String sceneId;
private String orderId;
private String processNo;
private String taskSeq;
private String targetOrderId;
private String targetProcessNo;
private String targetTaskSeq;
}
\ No newline at end of file
......@@ -10,10 +10,10 @@ public class ProdProcessExec {
private String execId;
private String sceneId;
private String orderId;
private String processId;
private String processNo;
private String processName;
private String machineId;
private String routingDetailId;
private String taskSeq;
private String routingDetailName;
private Long machineId;
private String resourceGroup;
private BigDecimal planQty;
private BigDecimal actualQty;
......@@ -29,4 +29,42 @@ private Long changeDuration;
private Short logicalOrder;
private LocalDateTime targetStartDate;
private LocalDateTime targetEndDate;
/**
* 工序准备工时(小时)
* 注释: 工序准备工时
*/
private BigDecimal setupTime;
/**
* 换线时间(小时)
* 注释: 换线时间
*/
private BigDecimal changeLineTime;
/**
* 常数时间
* 注释: 常数时间
*/
private BigDecimal constTime;
/**
* 前处理时间(秒)
* 注释: 前处理时间(秒)
*/
private Long preprocessingTime;
/**
* 后处理时间(秒)
* 注释: 后处理时间(秒)
*/
private Long postprocessingTime;
//速度
private BigDecimal speed;
}
\ No newline at end of file
package com.aps.entity;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
public class RoutingDetail {
private Integer id;
private LocalDate creationTime;
private Long creatorUserId;
private LocalDate lastModificationTime;
private Long lastModifierUserId;
private Boolean isDeleted;
private Long deleterUserId;
private LocalDate deletionTime;
private Integer classId;
private Integer routingHeaderId;
private LocalDateTime creationTime;
private BigDecimal creatorUserId;
private LocalDateTime lastModificationTime;
private BigDecimal lastModifierUserId;
private Short isDeleted;
private BigDecimal deleterUserId;
private LocalDateTime deletionTime;
private Long classId;
private Long routingHeaderId;
private String name;
private BigDecimal taskSeq;
private Short taskSeq;
private String description;
private String taskContent;
private Integer resourceId;
private Long resourceId;
private Short resourceType;
private BigDecimal runtime;
private BigDecimal setupTime;
private BigDecimal transportTime;
private BigDecimal checkTime;
private BigDecimal setupTime;
private BigDecimal transportTime;
private Short checkTime;
private Short checkFlag;
private BigDecimal efficiencyValue;
private Short efficiencyValue;
private BigDecimal singleOut;
private Short isOutside;
private Integer departmentId;
private Long departmentId;
private Short isImportant;
private Integer milestoneId;
private Integer phaseId;
private Long milestoneId;
private Long phaseId;
private Short status;
private String remark;
private String extend;
private BigDecimal outsideTime;
private BigDecimal performanceHours;
private Short outsideTime;
private Short performanceHours;
private String resourceCode;
private Integer isImportantResources;
private BigDecimal schedulingWorkingHours;
private BigDecimal realWorkingHours;
private BigDecimal realRuntime;
private BigDecimal performanceWorkingHours;
private Integer isParticipateIntime;
private Short isImportantResources;
private Short schedulingWorkingHours;
private Short realWorkingHours;
private Short realRuntime;
private Short performanceWorkingHours;
private Short isParticipateIntime;
private String equipType;
private Integer equipTypeId;
private Long equipTypeId;
private String note;
private String fileId;
private Integer measureUnit;
private Long measureUnit;
private String measureUnitName;
private BigDecimal afterProcessTime;
private Integer isGeneral;
private Integer canInterrupt;
private Integer canStartEarly;
private BigDecimal previousStartTimeBegin;
private Short afterProcessTime;
private Long isGeneral;
private Long canInterrupt;
private Long canStartEarly;
private Short previousStartTimeBegin;
private String code;
private String tool;
private BigDecimal changeLineTime;
private Integer preDetailId;
private Integer connectType;
private Integer connectProperty;
private BigDecimal changeLineTime;
private Long preDetailId;
private Long connectType;
private Long connectProperty;
private String connectTypeName;
private String connectPropertyName;
private String strSetupTime;
......@@ -74,4 +72,13 @@ private Long isync;
private BigDecimal constTime;
private String usable;
private BigDecimal leadTime;
}
private BigDecimal batchQty;
private BigDecimal minProductionQty;
private BigDecimal maxProductionQty;
private BigDecimal productionTakt;
private Long preprocessingTime;
private Long postprocessingTime;
private BigDecimal splitMinQty;
private BigDecimal splitMaxQty;
private Short equipmentConnectivity;
}
\ No newline at end of file
......@@ -15,5 +15,5 @@ public interface LanuchService {
* @author: jdt
* @return 结果
*/
R<String> lanuch(List<String> prodOrderMainIds, String sceneId, String username);
R<String> lanuch( String sceneId, String username);
}
\ No newline at end of file
......@@ -38,7 +38,7 @@ public class ProdEquipSpecialCalServiceImpl extends ServiceImpl<ProdEquipSpecial
// 过滤出is_deleted为0的记录
List<EquipCapacityDef> activeCapacityDefs = capacityDefs.stream()
.filter(e -> e.getIsDeleted() != null && e.getIsDeleted() == 0)
.filter(e -> e.getIsDeleted() != null && e.getIsDeleted() == 0 && e.getReferenceId() != null)
.collect(Collectors.toList());
// 转换对象并设置必要字段
......
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