Merge branch 'master' of https://gitee.com/forever_win/mesnac.biz
# Conflicts: # common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java
commit
d13545f9ab
@ -0,0 +1,356 @@
|
||||
package com.foreverwin.mesnac.equip.dto;
|
||||
|
||||
import com.foreverwin.mesnac.equip.model.ResourceInspectTaskParam;
|
||||
import com.foreverwin.mesnac.equip.model.ResourceInspectTaskSpare;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 设备检验任务实体类
|
||||
* </p>
|
||||
*
|
||||
* @author pavel.Liu
|
||||
* @since 2021-06-24
|
||||
*/
|
||||
|
||||
public class ResourceInspectTaskDto implements Serializable {
|
||||
|
||||
/**序号**/
|
||||
private Integer itemSeq;
|
||||
/**主键**/
|
||||
private String handle;
|
||||
/**站点**/
|
||||
private String site;
|
||||
/**任务编号**/
|
||||
private String taskNo;
|
||||
/**类型(自动AUTO/手动)**/
|
||||
private String category;
|
||||
/**任务描述**/
|
||||
private String description;
|
||||
/**任务状态(新建/处理中/完成/关闭)**/
|
||||
private String status;
|
||||
/**设备检验计划HANDLE**/
|
||||
private String resourceInspectPlanBo;
|
||||
/**检验项目清单HANDLE**/
|
||||
private String inspectionItemBo;
|
||||
/**设备HANDLE**/
|
||||
private String resourceBo;
|
||||
/**检验结果**/
|
||||
private String result;
|
||||
/**任务创建时间**/
|
||||
private LocalDateTime taskCreateDate;
|
||||
/**计划开始时间**/
|
||||
private LocalDateTime planStartDate;
|
||||
/**计划完成时间**/
|
||||
private LocalDateTime planCompleteDate;
|
||||
/**实际开始时间**/
|
||||
private LocalDateTime actualStartDate;
|
||||
/**实际完成时间**/
|
||||
private LocalDateTime actualCompleteDate;
|
||||
/**执行人**/
|
||||
private String executor;
|
||||
/**备注**/
|
||||
private String remark;
|
||||
/**检索时间段的开始时间**/
|
||||
private LocalDateTime compareStartTime;
|
||||
/**检索时间段的结束时间**/
|
||||
private LocalDateTime compareEndTime;
|
||||
/**设备编号NO**/
|
||||
private String resourceNo;
|
||||
/**设备描述**/
|
||||
private String resourceDescription;
|
||||
/**设备类型编号NO**/
|
||||
private String resourceTypeNo;
|
||||
/**设备类型描述**/
|
||||
private String resourceTypeDescription;
|
||||
/**设备类型HANDLE**/
|
||||
private String resourceTypeBo;
|
||||
/**计划编号NO**/
|
||||
private String planNo;
|
||||
/**计划描述**/
|
||||
private String planDescription;
|
||||
/**频率**/
|
||||
private String frequency;
|
||||
/**周期单位**/
|
||||
private String frequencyUnit;
|
||||
/**周期**/
|
||||
private String cycle;
|
||||
/**当前用户**/
|
||||
private String currentUser;
|
||||
/**车间**/
|
||||
private String workCenter;
|
||||
/**任务检验项明细**/
|
||||
private List<ResourceInspectTaskParam> taskItemDetailList;
|
||||
/**消耗备品**/
|
||||
private List<ResourceInspectTaskSpare> taskSpareList;
|
||||
|
||||
public List<ResourceInspectTaskParam> getTaskItemDetailList() {
|
||||
return taskItemDetailList;
|
||||
}
|
||||
|
||||
public void setTaskItemDetailList(List<ResourceInspectTaskParam> taskItemDetailList) {
|
||||
this.taskItemDetailList = taskItemDetailList;
|
||||
}
|
||||
|
||||
public List<ResourceInspectTaskSpare> getTaskSpareList() {
|
||||
return taskSpareList;
|
||||
}
|
||||
|
||||
public void setTaskSpareList(List<ResourceInspectTaskSpare> taskSpareList) {
|
||||
this.taskSpareList = taskSpareList;
|
||||
}
|
||||
|
||||
public ResourceInspectTaskDto() {
|
||||
}
|
||||
|
||||
public String getResourceNo() {
|
||||
return resourceNo;
|
||||
}
|
||||
|
||||
public void setResourceNo(String resourceNo) {
|
||||
this.resourceNo = resourceNo;
|
||||
}
|
||||
|
||||
public String getResourceDescription() {
|
||||
return resourceDescription;
|
||||
}
|
||||
|
||||
public void setResourceDescription(String resourceDescription) {
|
||||
this.resourceDescription = resourceDescription;
|
||||
}
|
||||
|
||||
public String getPlanNo() {
|
||||
return planNo;
|
||||
}
|
||||
|
||||
public void setPlanNo(String planNo) {
|
||||
this.planNo = planNo;
|
||||
}
|
||||
|
||||
public String getPlanDescription() {
|
||||
return planDescription;
|
||||
}
|
||||
|
||||
public void setPlanDescription(String planDescription) {
|
||||
this.planDescription = planDescription;
|
||||
}
|
||||
|
||||
public String getCycle() {
|
||||
return cycle;
|
||||
}
|
||||
|
||||
public void setCycle(String cycle) {
|
||||
this.cycle = cycle;
|
||||
}
|
||||
|
||||
public String getFrequency() {
|
||||
return frequency;
|
||||
}
|
||||
|
||||
public void setFrequency(String frequency) {
|
||||
this.frequency = frequency;
|
||||
}
|
||||
|
||||
public String getFrequencyUnit() {
|
||||
return frequencyUnit;
|
||||
}
|
||||
|
||||
public void setFrequencyUnit(String frequencyUnit) {
|
||||
this.frequencyUnit = frequencyUnit;
|
||||
}
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getSite() {
|
||||
return site;
|
||||
}
|
||||
|
||||
public void setSite(String site) {
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public String getTaskNo() {
|
||||
return taskNo;
|
||||
}
|
||||
|
||||
public void setTaskNo(String taskNo) {
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getResourceInspectPlanBo() {
|
||||
return resourceInspectPlanBo;
|
||||
}
|
||||
|
||||
public void setResourceInspectPlanBo(String resourceInspectPlanBo) {
|
||||
this.resourceInspectPlanBo = resourceInspectPlanBo;
|
||||
}
|
||||
|
||||
public String getInspectionItemBo() {
|
||||
return inspectionItemBo;
|
||||
}
|
||||
|
||||
public void setInspectionItemBo(String inspectionItemBo) {
|
||||
this.inspectionItemBo = inspectionItemBo;
|
||||
}
|
||||
|
||||
public String getResourceBo() {
|
||||
return resourceBo;
|
||||
}
|
||||
|
||||
public void setResourceBo(String resourceBo) {
|
||||
this.resourceBo = resourceBo;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public LocalDateTime getTaskCreateDate() {
|
||||
return taskCreateDate;
|
||||
}
|
||||
|
||||
public void setTaskCreateDate(LocalDateTime taskCreateDate) {
|
||||
this.taskCreateDate = taskCreateDate;
|
||||
}
|
||||
|
||||
public LocalDateTime getPlanStartDate() {
|
||||
return planStartDate;
|
||||
}
|
||||
|
||||
public void setPlanStartDate(LocalDateTime planStartDate) {
|
||||
this.planStartDate = planStartDate;
|
||||
}
|
||||
|
||||
public LocalDateTime getPlanCompleteDate() {
|
||||
return planCompleteDate;
|
||||
}
|
||||
|
||||
public void setPlanCompleteDate(LocalDateTime planCompleteDate) {
|
||||
this.planCompleteDate = planCompleteDate;
|
||||
}
|
||||
|
||||
public LocalDateTime getActualStartDate() {
|
||||
return actualStartDate;
|
||||
}
|
||||
|
||||
public void setActualStartDate(LocalDateTime actualStartDate) {
|
||||
this.actualStartDate = actualStartDate;
|
||||
}
|
||||
|
||||
public LocalDateTime getActualCompleteDate() {
|
||||
return actualCompleteDate;
|
||||
}
|
||||
|
||||
public void setActualCompleteDate(LocalDateTime actualCompleteDate) {
|
||||
this.actualCompleteDate = actualCompleteDate;
|
||||
}
|
||||
|
||||
public String getExecutor() {
|
||||
return executor;
|
||||
}
|
||||
|
||||
public void setExecutor(String executor) {
|
||||
this.executor = executor;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public LocalDateTime getCompareStartTime() {
|
||||
return compareStartTime;
|
||||
}
|
||||
|
||||
public void setCompareStartTime(LocalDateTime compareStartTime) {
|
||||
this.compareStartTime = compareStartTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getCompareEndTime() {
|
||||
return compareEndTime;
|
||||
}
|
||||
|
||||
public void setCompareEndTime(LocalDateTime compareEndTime) {
|
||||
this.compareEndTime = compareEndTime;
|
||||
}
|
||||
|
||||
public String getCurrentUser() {
|
||||
return currentUser;
|
||||
}
|
||||
|
||||
public void setCurrentUser(String currentUser) {
|
||||
this.currentUser = currentUser;
|
||||
}
|
||||
|
||||
public String getResourceTypeNo() {
|
||||
return resourceTypeNo;
|
||||
}
|
||||
|
||||
public void setResourceTypeNo(String resourceTypeNo) {
|
||||
this.resourceTypeNo = resourceTypeNo;
|
||||
}
|
||||
|
||||
public String getResourceTypeDescription() {
|
||||
return resourceTypeDescription;
|
||||
}
|
||||
|
||||
public void setResourceTypeDescription(String resourceTypeDescription) {
|
||||
this.resourceTypeDescription = resourceTypeDescription;
|
||||
}
|
||||
|
||||
public String getResourceTypeBo() {
|
||||
return resourceTypeBo;
|
||||
}
|
||||
|
||||
public void setResourceTypeBo(String resourceTypeBo) {
|
||||
this.resourceTypeBo = resourceTypeBo;
|
||||
}
|
||||
|
||||
public String getWorkCenter() {
|
||||
return workCenter;
|
||||
}
|
||||
|
||||
public void setWorkCenter(String workCenter) {
|
||||
this.workCenter = workCenter;
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.foreverwin.mesnac.production.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 描述: 工序开始
|
||||
* 作者: philip
|
||||
* 时间: 2021-6-30
|
||||
*/
|
||||
public interface SfcCrossService {
|
||||
/**
|
||||
* 开始
|
||||
* @param site
|
||||
* @param operationRef
|
||||
* @param resource
|
||||
* @param sfcRef
|
||||
* @param qty
|
||||
* @throws Exception
|
||||
*/
|
||||
void startAction(String site, String operationRef, String resource, String sfcRef, BigDecimal qty) throws Exception;
|
||||
|
||||
/**
|
||||
* 完成
|
||||
* @param site
|
||||
* @param operationRef
|
||||
* @param resource
|
||||
* @param sfcRef
|
||||
* @param qty
|
||||
* @throws Exception
|
||||
*/
|
||||
void completeAction(String site, String operationRef, String resource, String sfcRef, BigDecimal qty) throws Exception;
|
||||
|
||||
/**
|
||||
* 开始完成单个SFC
|
||||
* @param site
|
||||
* @param operationRef
|
||||
* @param resource
|
||||
* @param sfcRef
|
||||
* @param qty
|
||||
* @throws Exception
|
||||
*/
|
||||
void passAction(String site, String operationRef, String resource, String sfcRef, BigDecimal qty) throws Exception;
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.foreverwin.mesnac.production.service.impl;
|
||||
|
||||
|
||||
import com.foreverwin.mesnac.production.service.SfcCrossService;
|
||||
import com.foreverwin.modular.core.meext.MEServices;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.sap.me.plant.ResourceBOHandle;
|
||||
import com.sap.me.production.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 描述: 工序开始
|
||||
* 作者: philip
|
||||
* 时间: 2021-06-30
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SfcCrossServiceImpl implements SfcCrossService {
|
||||
|
||||
@Override
|
||||
public void startAction(String site, String operationRef,
|
||||
String resource, String sfcRef, BigDecimal qty) throws Exception {
|
||||
SfcStartServiceInterface sfcStartService = MEServices.create("com.sap.me.production", "SfcStartService", site);
|
||||
StartSfcRequest paramStartSfcRequest = new StartSfcRequest();
|
||||
paramStartSfcRequest.setQty(qty);
|
||||
paramStartSfcRequest.setOperationRef(operationRef);
|
||||
paramStartSfcRequest.setResourceRef(new ResourceBOHandle(site, resource).getValue());
|
||||
paramStartSfcRequest.setSfcRef(sfcRef);
|
||||
paramStartSfcRequest.setUserRef(CommonMethods.getUserBo());
|
||||
sfcStartService.startSfc(paramStartSfcRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void completeAction(String site, String operationRef,
|
||||
String resource, String sfcRef, BigDecimal qty) throws Exception {
|
||||
SfcCompleteServiceInterface sfcCompleteService = MEServices.create("com.sap.me.production", "SfcCompleteService", site);
|
||||
CompleteSfcRequest paramCompleteSfcRequest = new CompleteSfcRequest();
|
||||
paramCompleteSfcRequest.setOperationRef(operationRef);
|
||||
paramCompleteSfcRequest.setResourceRef(new ResourceBOHandle(site, resource).getValue());
|
||||
paramCompleteSfcRequest.setSfcRef(sfcRef);
|
||||
if(qty != null) {
|
||||
paramCompleteSfcRequest.setQuantity(qty);
|
||||
}
|
||||
paramCompleteSfcRequest.setLocation("");
|
||||
sfcCompleteService.completeSfc(paramCompleteSfcRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void passAction(String site, String operationRef,
|
||||
String resource, String sfcRef, BigDecimal qty) throws Exception {
|
||||
SfcCompleteServiceInterface sfcCompleteService = MEServices.create("com.sap.me.production", "SfcCompleteService", site);
|
||||
CompleteSfcQuickRequest paramCompleteSfcRequest = new CompleteSfcQuickRequest();
|
||||
paramCompleteSfcRequest.setOperationRef(operationRef);
|
||||
paramCompleteSfcRequest.setResourceRef(new ResourceBOHandle(site, resource).getValue());
|
||||
paramCompleteSfcRequest.setSfcRef(sfcRef);
|
||||
if(qty != null) {
|
||||
paramCompleteSfcRequest.setQuantity(qty);
|
||||
}
|
||||
sfcCompleteService.completeSfcQuick(paramCompleteSfcRequest);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue