From c8b848c2465bab92c337804b0edc3642c575fdfa Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Wed, 29 May 2024 22:50:23 +0800 Subject: [PATCH] pcn step --- .../step/MesAssemblyShowStepService.java | 8 ++ .../step/MesFirstMouldNoReadStepService.java | 3 + .../mes/pcn/pojo/context/MesCellEquipContext.java | 6 +- .../pojo/context/MesEquipLogDispatchContext.java | 5 +- .../context/MesEquipVariableCfgCollectContext.java | 5 +- .../context/MesEquipVariableCollectContext.java | 6 +- .../pojo/context/MesProductionAssemblyContext.java | 118 +++++++++++++++++++++ .../MesProductionAssemblyNoSortContext.java | 28 +++++ .../context/MesProductionAssemblySortContext.java | 100 +++++++++++++++++ .../pojo/context/MesProductionProcessContext.java | 5 +- 10 files changed, 279 insertions(+), 5 deletions(-) create mode 100644 modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyContext.java create mode 100644 modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyNoSortContext.java create mode 100644 modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblySortContext.java diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowStepService.java index f1a0d14..2926014 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowStepService.java @@ -3,6 +3,7 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step; import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService; import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionProcessContext; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService; +import cn.estsh.i3plus.pojo.mes.bean.MesWorkCenter; import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; import cn.estsh.i3plus.pojo.mes.model.StationResultBean; import cn.estsh.i3plus.pojo.mes.model.StepResult; @@ -28,9 +29,16 @@ public class MesAssemblyShowStepService extends BaseStepService { StepResult stepResult = StepResult.getSuccessComplete(); + //获取上下文信息 MesProductionProcessContext productionProcessContext = productionProcessContextStepService.getCurCellEquipment(reqBean); + //配置错误 抛出异常 + if (!productionProcessContext.getSuccess()) execExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), productionProcessContext.getMessage()); + //从上下文中取出生产线对象 + MesWorkCenter workCenter = productionProcessContext.getWorkCenter(); + +// if (MesExtEnumUtil.WORK_CENTER_TYPE.SORT.getValue() == workCenter.getCenterType()) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesFirstMouldNoReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesFirstMouldNoReadStepService.java index b11fd23..f9ac809 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesFirstMouldNoReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesFirstMouldNoReadStepService.java @@ -79,6 +79,9 @@ public class MesFirstMouldNoReadStepService extends BaseStepService { //获取上下文信息 MesProductionProcessContext productionProcessContext = productionProcessContextStepService.getCurCellEquipment(reqBean, stepParamMap); + //当前工序已存在读取待验证的装配件条码 + if (!StringUtils.isEmpty(productionProcessContext.getAssemblySnJson())) return stepResult; + //当前工序已存在头道模具号跟一模多腔信息 if (!StringUtils.isEmpty(productionProcessContext.getFirstMouldNo()) && !StringUtils.isEmpty(productionProcessContext.getMouldCavityJson())) return stepResult; diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesCellEquipContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesCellEquipContext.java index a9464c1..93cc7dd 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesCellEquipContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesCellEquipContext.java @@ -4,11 +4,15 @@ import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil; import io.swagger.annotations.ApiParam; import lombok.Data; +import java.io.Serializable; + /** * 生产过程上下文对象-工位设备信息 */ @Data -public class MesCellEquipContext { +public class MesCellEquipContext implements Serializable { + + private static final long serialVersionUID = -2603242542443555462L; @ApiParam("组织代码") private String organizeCode; diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipLogDispatchContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipLogDispatchContext.java index 85731fb..6e04ac9 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipLogDispatchContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipLogDispatchContext.java @@ -3,13 +3,16 @@ package cn.estsh.i3plus.ext.mes.pcn.pojo.context; import io.swagger.annotations.ApiParam; import lombok.Data; +import java.io.Serializable; import java.util.List; /** * 生产过程上下文对象-设备LOG采集处理对象 */ @Data -public class MesEquipLogDispatchContext { +public class MesEquipLogDispatchContext implements Serializable { + + private static final long serialVersionUID = 917933189935264321L; @ApiParam("组织代码") private String organizeCode; diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipVariableCfgCollectContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipVariableCfgCollectContext.java index 0dbcc21..32ab7bd 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipVariableCfgCollectContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipVariableCfgCollectContext.java @@ -6,6 +6,7 @@ import lombok.Data; import org.springframework.beans.BeanUtils; import org.springframework.util.CollectionUtils; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -13,7 +14,9 @@ import java.util.List; * 生产过程上下文对象-数据变量接口逻辑信息 */ @Data -public class MesEquipVariableCfgCollectContext { +public class MesEquipVariableCfgCollectContext implements Serializable { + + private static final long serialVersionUID = 4521711037005858586L; @ApiParam("组织代码") private String organizeCode; diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipVariableCollectContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipVariableCollectContext.java index b8fc2d6..3f153af 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipVariableCollectContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesEquipVariableCollectContext.java @@ -5,11 +5,15 @@ import io.swagger.annotations.ApiParam; import lombok.Data; import org.springframework.beans.BeanUtils; +import java.io.Serializable; + /** * 生产过程上下文对象-数据变量平铺设备LOG信息(兼容扫描信息) */ @Data -public class MesEquipVariableCollectContext { +public class MesEquipVariableCollectContext implements Serializable { + + private static final long serialVersionUID = -5527066200627610909L; @ApiParam("组织代码") private String organizeCode; diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyContext.java new file mode 100644 index 0000000..a6e944b --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyContext.java @@ -0,0 +1,118 @@ +package cn.estsh.i3plus.ext.mes.pcn.pojo.context; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +import java.io.Serializable; + +/** + * 生产过程上下文对象-装配件清单信息 + */ +@Data +public class MesProductionAssemblyContext implements Serializable { + + private static final long serialVersionUID = 2382117884422723639L; + + @ApiParam("加工记录ID") + private Long productionRecordId; + + @ApiParam("装配件零件号") + private String assemblyPartNo; + + @ApiParam("装配件零件名称") + private String assemblyPartName; + + @ApiParam("装配件条码") + private String assemblySn; + + //非排序可能无值 + @ApiParam(value = "生产工单号") + private String workOrderNo; + + @ApiParam("过程条码") + private String serialNumber; + + @ApiParam("零件条码") + private String productSn; + + @ApiParam("客户条码") + private String custSn; + + @ApiParam("生产工单零件号") + private String partNo; + + @ApiParam("生产工单零件名称") + private String partName; + + @ApiParam("装配零件类型") + private Integer assemblyPartType; + + //10=已绑定, 20=解绑, 30=待绑定, 40=跳过(待绑定) + @ApiParam("装配零件状态") + private Integer assemblyStatus; + + @ApiParam("是否跳过") + private Integer isSkip; + + @ApiParam("开模记录ID") + private String mouldRecordId; + + @ApiParam("模具号") + private String mouldNo; + + @ApiParam("装配件条码确认方式") + private Integer matchType; + + @ApiParam("扫描规则") + private String matchRule; + + //10=非排序装配件维护表ID, 20=排序线排产装配目视项ID + @ApiParam("数据来源") + private Integer dataSource; + + @ApiParam("来源ID") + private Long sourceId; + + @ApiParam(value = "生产线类型 10=排序 20=非排序") + private Integer centerType; + + @ApiParam(value = "排序/非排序产品加工规则ID") + private Long pid; + + @ApiParam("最小值") + private Double minValue; + + @ApiParam("最大值") + private Double maxValue; + + @ApiParam(value = "装备序号") + private Integer routeSeq; + + @ApiParam("组织代码") + private String organizeCode; + + @ApiParam("区域代码") + private String areaCode; + + @ApiParam("生产线代码") + private String workCenterCode; + + @ApiParam("工位代码") + private String workCellCode; + + @ApiParam("设备代码") + private String equipmentCode; + + @ApiParam("工序代码") + private String processCode; + + @ApiParam("工序名称") + private String processName; + + @ApiParam("工艺代码") + private String craftCode; + + @ApiParam("工艺名称") + private String craftName; + +} diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyNoSortContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyNoSortContext.java new file mode 100644 index 0000000..a919cb2 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblyNoSortContext.java @@ -0,0 +1,28 @@ +package cn.estsh.i3plus.ext.mes.pcn.pojo.context; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +import java.io.Serializable; + +/** + * 生产过程上下文对象-装配件清单信息(非排序) + */ +@Data +public class MesProductionAssemblyNoSortContext extends MesProductionAssemblyContext implements Serializable { + + private static final long serialVersionUID = -6507517107073405709L; + + @ApiParam(value = "BOM明细ID") + private String bomDetailId; + + @ApiParam(value = "是否可复用条码") + private Integer isRepeat; + + @ApiParam(value = "是否忽略回车") + private Integer isIgnoreEntry; + + @ApiParam(value = "工序用量") + private Integer qty; + +} diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblySortContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblySortContext.java new file mode 100644 index 0000000..b774f91 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionAssemblySortContext.java @@ -0,0 +1,100 @@ +package cn.estsh.i3plus.ext.mes.pcn.pojo.context; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +import java.io.Serializable; + +/** + * 生产过程上下文对象-装配件清单信息(排序) + */ +@Data +public class MesProductionAssemblySortContext extends MesProductionAssemblyContext implements Serializable { + + private static final long serialVersionUID = -1492128619505737538L; + + @ApiParam(value = "工艺顺序号") + private Integer processSeq; + + @ApiParam(value = "生产零件号") + private String productPartNo; + + @ApiParam(value = "汇报零件号") + private String reportPartNo; + + @ApiParam(value = "零件类型") + private String partTypeCode; + + @ApiParam(value = "VPPS码") + private String vppsCode; + + @ApiParam(value = "车型代码") + private String vehicleNo; + + @ApiParam(value = "车系") + private String vehicleClassNo; + + @ApiParam(value = "显示顺序") + private Integer displaySeq; + + @ApiParam(value = "显示内容") + private String displayValue; + + @ApiParam(value = "显示规则") + private String displayRule; + + @ApiParam(value = "动作代码") + private String actionCode; + + @ApiParam(value = "动作名称") + private String actionName; + + @ApiParam(value = "汇报方式") + private Integer reportType; + + @ApiParam(value = "SAP来源库位") + private String srcErpLocation; + + @ApiParam(value = "SAP目标库位") + private String destErpLocation; + + @ApiParam(value = "装配爆炸图FID") + private Long imageFileId ; + + @ApiParam(value = "条码打印方式") + private Integer printType; + + @ApiParam(value = "条码打印机") + private String printer; + + @ApiParam(value = "条码打印模板") + private String printTemplate; + + @ApiParam(value = "是否启动组合条码") + private String isCombineSn; + + @ApiParam(value = "音频文件") + private Long audioFileId; + + @ApiParam(value = "逻辑数量") + private Double logicNum; + + @ApiParam(value = "是否启用逻辑数量") + private Integer isLogicNum; + + @ApiParam(value = "显示颜色") + private String showColor; + + @ApiParam(value = "是否保存过程工艺参数") + private Integer isSaveProcessParam ; + + @ApiParam(value = "是否保存过程工艺参数类型") + private Integer isSaveProcessParamType; + + @ApiParam(value = "扫描条码载取符") + private String delimiter; + + @ApiParam(value = "生产组代码") + private String productGroupCode; + +} diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionProcessContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionProcessContext.java index 297cf7d..0a9af77 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionProcessContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionProcessContext.java @@ -8,6 +8,7 @@ import lombok.Data; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; +import java.io.Serializable; import java.util.*; import java.util.stream.Collectors; @@ -15,7 +16,9 @@ import java.util.stream.Collectors; * 生产过程上下文对象 */ @Data -public class MesProductionProcessContext { +public class MesProductionProcessContext implements Serializable { + + private static final long serialVersionUID = -622564192243157366L; @ApiParam("结果") private Boolean success;