diff --git a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesProduceSnExtService.java b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesProduceSnExtService.java index 625828e..db5b81d 100644 --- a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesProduceSnExtService.java +++ b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesProduceSnExtService.java @@ -4,14 +4,10 @@ import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn; import io.swagger.annotations.ApiOperation; import java.util.List; -import java.util.Map; public interface IMesProduceSnExtService { @ApiOperation(value = "根据零件条码查询零件条码信息") List getProduceSnList(String organizeCode, List productSnList); - @ApiOperation(value = "根据零件条码查询零件条码信息") - Map getProduceSnMap(String organizeCode, List productSnList); - } diff --git a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesProductionDispatchContextStepService.java b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesProductionDispatchContextStepService.java index 80d84a2..4b0cfda 100644 --- a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesProductionDispatchContextStepService.java +++ b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesProductionDispatchContextStepService.java @@ -1,9 +1,6 @@ package cn.estsh.i3plus.ext.mes.pcn.api.busi; -import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesCellEquipContext; -import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesEquipVariableCollectContext; -import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProdRuleContext; -import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionPartContext; +import cn.estsh.i3plus.ext.mes.pcn.pojo.context.*; import cn.estsh.i3plus.pojo.mes.bean.MesPart; import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn; import cn.estsh.i3plus.pojo.mes.model.StationKvBean; @@ -139,17 +136,29 @@ public interface IMesProductionDispatchContextStepService { @ApiOperation(value = "删除上下文扫/读信息:装配件条码") void deleteScanAssemblySnContext(StationRequestBean reqBean); + @ApiOperation(value = "获取进料主条码数据信息") + List getProductionPsInContext(StationRequestBean reqBean); + + @ApiOperation(value = "验证进料主条码数据是否存在") + Boolean checkProductionPsInIsExistContext(StationRequestBean reqBean); + + @ApiOperation(value = "保存进料主条码数据", notes = "[JSON]List") + Boolean saveProductionPsInContext(StationRequestBean reqBean, List productionPsInContextList); + + @ApiOperation(value = "删除进料主条码数据") + void deleteProductionPsInContext(StationRequestBean reqBean); + @ApiOperation(value = "获取上下文产出条码数据信息集合") - List getOutProduceSnDataContext(StationRequestBean reqBean); + List getProductionPsOutContext(StationRequestBean reqBean); @ApiOperation(value = "验证上下文产出条码数据信息集合是否存在") - Boolean checkOutProduceSnDataIsExistContext(StationRequestBean reqBean); + Boolean checkProductionPsOutIsExistContext(StationRequestBean reqBean); - @ApiOperation(value = "保存上下文产出条码数据信息集合", notes = "[JSON]List") - Boolean saveOutProduceSnDataContext(StationRequestBean reqBean, List outProduceSnDataList); + @ApiOperation(value = "保存上下文产出条码数据信息集合", notes = "[JSON]List") + Boolean saveProductionPsOutContext(StationRequestBean reqBean, List productionPsOutContextList); @ApiOperation(value = "删除上下文产出条码数据信息集合") - void deleteOutProduceSnDataContext(StationRequestBean reqBean); + void deleteProductionPsOutContext(StationRequestBean reqBean); @ApiOperation(value = "获取上下文产品加工规则数据信息集合") List getProdRuleDataContext(StationRequestBean reqBean); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProdRuleCfgExtService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProdRuleCfgExtService.java index 3f8c0e2..612f2ce 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProdRuleCfgExtService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProdRuleCfgExtService.java @@ -69,11 +69,19 @@ public class MesProdRuleCfgExtService implements IMesProdRuleCfgExtService { public List getProdRuleNosortCfgList(MesProdRuleContext prodRuleContext) { if (StringUtils.isEmpty(prodRuleContext.getOrganizeCode()) || StringUtils.isEmpty(prodRuleContext.getEquipmentCode())) return null; DdlPackBean packBean = DdlPackBean.getDdlPackBean(prodRuleContext.getOrganizeCode()); + DdlPreparedPack.getStringEqualPack(prodRuleContext.getEquipmentCode(), MesPcnExtConstWords.EQUIPMENT_CODE, packBean); + + //outPartNo与outPartNos 带入条件必须互斥 , 此处查询时不作判断 DdlPreparedPack.getStringEqualPack(prodRuleContext.getOutPartNo(), MesPcnExtConstWords.OUT_PART_NO, packBean); + DdlPreparedPack.getInPackList(prodRuleContext.getOutPartNoList(), MesPcnExtConstWords.OUT_PART_NO, packBean); if (prodRuleContext.getInPartNoIsEmpty()) DdlPreparedPack.getIsNull(MesPcnExtConstWords.IN_PART_NO, packBean); - else DdlPreparedPack.getStringEqualPack(prodRuleContext.getInPartNo(), MesPcnExtConstWords.IN_PART_NO, packBean); + else { + //inPartNo与inPartNos 带入条件必须互斥 , 此处查询时不作判断 + DdlPreparedPack.getStringEqualPack(prodRuleContext.getInPartNo(), MesPcnExtConstWords.IN_PART_NO, packBean); + DdlPreparedPack.getInPackList(prodRuleContext.getInPartNoList(), MesPcnExtConstWords.IN_PART_NO, packBean); + } if (prodRuleContext.getInPartNoRuleIsEmpty()) DdlPreparedPack.getIsNull(MesPcnExtConstWords.IN_PART_NO_RULE, packBean); else DdlPreparedPack.getIsNotNull(MesPcnExtConstWords.IN_PART_NO_RULE, packBean); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnExtService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnExtService.java index e256e45..a04dc8f 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnExtService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnExtService.java @@ -13,7 +13,10 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; -import java.util.*; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.TreeSet; import java.util.stream.Collectors; @Slf4j @@ -29,12 +32,15 @@ public class MesProduceSnExtService implements IMesProduceSnExtService { if (StringUtils.isEmpty(organizeCode) || CollectionUtils.isEmpty(productSnList)) return null; + productSnList = productSnList.size() == 1 ? productSnList : productSnList.stream().filter(o -> StringUtils.isEmpty(o)).distinct().collect(Collectors.toList()); + DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); if (productSnList.size() == 1) DdlPreparedPack.getStringEqualPack(productSnList.get(0), MesPcnExtConstWords.PRODUCT_SN, packBean); - else DdlPreparedPack.getInPackList(productSnList.stream().filter(o -> StringUtils.isEmpty(o)).distinct().collect(Collectors.toList()), MesPcnExtConstWords.PRODUCT_SN, packBean); + else DdlPreparedPack.getInPackList(productSnList, MesPcnExtConstWords.PRODUCT_SN, packBean); //根据创建时间倒叙查询零件条码 DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{MesPcnExtConstWords.CREATE_DATE_TIME}, packBean); + //相同零件条码可能会存在多条数据, 所以去重 return distinctProduceSnList(produceSnRepository.findByHqlWhere(packBean)); } @@ -43,14 +49,4 @@ public class MesProduceSnExtService implements IMesProduceSnExtService { produceSnDataList.stream().filter(o -> null != o).distinct().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(MesProduceSn::getProductSn))), ArrayList::new)); } - //根据零件条码查询零件条码信息 - @Override - public Map getProduceSnMap(String organizeCode, List productSnList) { - return groupProduceSnList(getProduceSnList(organizeCode, productSnList)); - } - - private Map groupProduceSnList(List produceSnDataList) { - return CollectionUtils.isEmpty(produceSnDataList) ? null : produceSnDataList.stream().filter(o -> null != o).collect(Collectors.toMap(MesProduceSn::getProductSn, o -> o)); - } - } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyScanStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyScanStepService.java index 4ec7b6b..b170d6b 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyScanStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyScanStepService.java @@ -48,6 +48,7 @@ public class MesAssemblyScanStepService extends BaseStepService { StepResult stepResult = StepResult.getSuccessComplete(); + //TODO 先判断上下文当前工序是否全部扫完 if (StringUtils.isEmpty(reqBean.getScanInfo())) execSendGuideAndThrowEx(reqBean, resultBean, "请扫描装配件条码!"); //扫描信息置空 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionDispatchContextStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionDispatchContextStepService.java index 715f499..487f586 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionDispatchContextStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionDispatchContextStepService.java @@ -1,24 +1,19 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step.context; import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepService; -import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesCellEquipContext; -import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesEquipVariableCollectContext; -import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProdRuleContext; -import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionPartContext; +import cn.estsh.i3plus.ext.mes.pcn.pojo.context.*; import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService; import cn.estsh.i3plus.mes.pcn.util.StationKvBeanUtil; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil; import cn.estsh.i3plus.pojo.mes.bean.MesPart; -import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn; import cn.estsh.i3plus.pojo.mes.model.StationKvBean; import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; import cn.estsh.i3plus.pojo.mes.model.StationResultBean; import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; -import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -312,31 +307,58 @@ public class MesProductionDispatchContextStepService extends BaseStepService imp deleteFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.SCAN_ASSEMBLY_SN_CONTEXT); } + //获取进料主条码数据信息 + @Override + public List getProductionPsInContext(StationRequestBean reqBean) { + String productionPsInJson = getFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_IN_CONTEXT); + return !StringUtils.isEmpty(productionPsInJson) ? JSONObject.parseArray(productionPsInJson, MesProductionPsInContext.class) : null; + } + + //验证上下文进料主条码数据集合是否存在 + @Override + public Boolean checkProductionPsInIsExistContext(StationRequestBean reqBean) { + String productionPsInJson = getFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_IN_CONTEXT); + return !StringUtils.isEmpty(productionPsInJson) ? true : false; + } + + //保存上下文进料主条码数据信息集合 [JSON]List + @Override + public Boolean saveProductionPsInContext(StationRequestBean reqBean, List productionPsInContextList) { + if (CollectionUtils.isEmpty(productionPsInContextList)) return false; + return saveFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_IN_CONTEXT, JSONObject.toJSONString(productionPsInContextList)); + } + + //删除上下文进料主条码数据信息集合 + @Override + public void deleteProductionPsInContext(StationRequestBean reqBean) { + deleteFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_IN_CONTEXT); + } + //获取上下文产出条码数据信息集合 @Override - public List getOutProduceSnDataContext(StationRequestBean reqBean) { - String outProduceSnDataJson = getFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.OUT_PRODUCE_SN_DATA_CONTEXT); - return !StringUtils.isEmpty(outProduceSnDataJson) ? JSONObject.parseArray(outProduceSnDataJson, MesProduceSn.class) : null; + public List getProductionPsOutContext(StationRequestBean reqBean) { + String productionPsOutJson = getFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_OUT_CONTEXT); + return !StringUtils.isEmpty(productionPsOutJson) ? JSONObject.parseArray(productionPsOutJson, MesProductionPsOutContext.class) : null; } //验证上下文产出条码数据信息集合是否存在 @Override - public Boolean checkOutProduceSnDataIsExistContext(StationRequestBean reqBean) { - String outProduceSnDataJson = getFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.OUT_PRODUCE_SN_DATA_CONTEXT); - return !StringUtils.isEmpty(outProduceSnDataJson) ? true : false; + public Boolean checkProductionPsOutIsExistContext(StationRequestBean reqBean) { + String productionPsOutJson = getFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_OUT_CONTEXT); + return !StringUtils.isEmpty(productionPsOutJson) ? true : false; } - //保存上下文产出条码数据信息集合 [JSON]List + //保存上下文产出条码数据信息集合 [JSON]List @Override - public Boolean saveOutProduceSnDataContext(StationRequestBean reqBean, List outProduceSnDataList) { - if (CollectionUtils.isEmpty(outProduceSnDataList)) return false; - return saveFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.OUT_PRODUCE_SN_DATA_CONTEXT, JSONObject.toJSONString(outProduceSnDataList)); + public Boolean saveProductionPsOutContext(StationRequestBean reqBean, List productionPsOutContextList) { + if (CollectionUtils.isEmpty(productionPsOutContextList)) return false; + return saveFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_OUT_CONTEXT, JSONObject.toJSONString(productionPsOutContextList)); } //删除上下文产出条码数据信息集合 @Override - public void deleteOutProduceSnDataContext(StationRequestBean reqBean) { - deleteFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.OUT_PRODUCE_SN_DATA_CONTEXT); + public void deleteProductionPsOutContext(StationRequestBean reqBean) { + deleteFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_OUT_CONTEXT); } //获取上下文产品加工规则信息集合 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessContextStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessContextStepService.java index 5695371..203e6fa 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessContextStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionProcessContextStepService.java @@ -50,6 +50,7 @@ public class MesProductionProcessContextStepService extends BaseStepService impl //存储生产过程上下文对象【工步根据业务实际情况执行,配置错误等情况无需执行】 @Override public Boolean saveProductionProcessContext(StationRequestBean reqBean, MesProductionProcessContext productionProcessContext) { + if (!productionProcessContext.getIsNeedCache()) return true; return saveFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.BASE_DATA_CONTEXT, JSONObject.toJSONString(productionProcessContext)); } diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProdRuleContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProdRuleContext.java index 448f588..43cc367 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProdRuleContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProdRuleContext.java @@ -13,7 +13,7 @@ import java.util.ArrayList; import java.util.List; /** - * 生产过程上下文对象-产品加工规则(排序) + * 生产过程上下文对象-产品加工规则 */ @Data public class MesProdRuleContext implements Serializable { @@ -90,6 +90,13 @@ public class MesProdRuleContext implements Serializable { @ApiParam(name = "子箱设备信号点") private String packageEquSignal; + //----------仅作为查询条件冗余------------- + @ApiParam(name = "进料零件号") + private String inPartNos; + + @ApiParam(name = "产成零件号") + private String outPartNos; + public MesProdRuleContext() {} public MesProdRuleContext(String organizeCode) { @@ -133,6 +140,28 @@ public class MesProdRuleContext implements Serializable { return this; } + public MesProdRuleContext inPartNos(List inPartNoList) { + if (CollectionUtils.isEmpty(inPartNoList)) return this; + if (inPartNoList.size() > 1) this.inPartNos = JSONObject.toJSONString(inPartNoList); + else this.inPartNo = inPartNoList.get(0); + return this; + } + + public MesProdRuleContext outPartNos(List outPartNoList) { + if (CollectionUtils.isEmpty(outPartNoList)) return this; + if (outPartNoList.size() > 1) this.outPartNos = JSONObject.toJSONString(outPartNoList); + else this.outPartNo = outPartNoList.get(0); + return this; + } + + public List getInPartNoList() { + return !StringUtils.isEmpty(this.inPartNos) ? JSONObject.parseObject(this.inPartNos, List.class) : null; + } + + public List getOutPartNoList() { + return !StringUtils.isEmpty(this.outPartNos) ? JSONObject.parseObject(this.outPartNos, List.class) : null; + } + public MesProdRuleContext equipmentCode(String equipmentCode) { this.equipmentCode = equipmentCode; return this; @@ -143,6 +172,7 @@ public class MesProdRuleContext implements Serializable { return this; } + //根据生产线类型返回装配件数据集合【向上转型】 public List getAssemblyDataContext(MesWorkCenter workCenter) { if (StringUtils.isEmpty(this.assemblyDataJson)) return null; List productionAssemblyContextList = new ArrayList<>(); diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsInContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsInContext.java new file mode 100644 index 0000000..c18cad2 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsInContext.java @@ -0,0 +1,59 @@ +package cn.estsh.i3plus.ext.mes.pcn.pojo.context; + +import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import io.swagger.annotations.ApiParam; +import lombok.Data; + +import java.io.Serializable; + +/** + * 生产过程上下文对象-零件条码(非排序进料零件条码/排序工单号) + */ +@Data +public class MesProductionPsInContext implements Serializable { + + private static final long serialVersionUID = 5562937531822977296L; + + @ApiParam(name = "数据关联键 排序:生产工单号 非排序:snowflakeId") + private String foreignKey; + + @ApiParam("组织代码") + private String organizeCode; + + @ApiParam("零件条码ID") + private Long id; + + @ApiParam("非排序进料零件条码/排序工单号") + private String productSn; + + @ApiParam("过程条码") + private String serialNumber; + + @ApiParam("客户条码") + private String custSn; + + @ApiParam("零件号") + private String partNo; + + @ApiParam("零件名称") + private String partName; + + //默认否 + @ApiParam("是否顺序防错") + private Integer isCheckSeq = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); + + //默认否 + @ApiParam(name = "是否前道工艺防错") + private Integer isCheckCraft = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); + + //默认未验证 + @ApiParam("顺序防错结果") + private Integer checkSeqResult = MesPcnExtConstWords.ZERO; + + //默认未验证 + @ApiParam(name = "前道工艺防错结果") + private Integer checkCraftResult = MesPcnExtConstWords.ZERO; + + +} diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsOutContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsOutContext.java new file mode 100644 index 0000000..fb9d355 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesProductionPsOutContext.java @@ -0,0 +1,40 @@ +package cn.estsh.i3plus.ext.mes.pcn.pojo.context; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +import java.io.Serializable; + +/** + * 生产过程上下文对象-零件条码(非排序产出零件条码) + */ +@Data +public class MesProductionPsOutContext implements Serializable { + + private static final long serialVersionUID = 5562937531822977296L; + + @ApiParam(name = "数据关联键 非排序:snowflakeId") + private String foreignKey; + + @ApiParam("组织代码") + private String organizeCode; + + @ApiParam("零件条码ID") + private Long id; + + @ApiParam("非排序产出零件条码") + private String productSn; + + @ApiParam("非排序产出零件过程条码") + private String serialNumber; + + @ApiParam("非排序产出客户条码") + private String custSn; + + @ApiParam("零件号") + private String partNo; + + @ApiParam("零件名称") + private String partName; + +} diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java index 29eefe3..32e993c 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java @@ -185,12 +185,10 @@ public class MesPcnExtConstWords { public static final String SCAN_ASSEMBLY_SN_CONTEXT = "SCAN_ASSEMBLY_SN_CONTEXT"; // 上下文: 产品加工规则数据信息 public static final String PROD_RULE_DATA_CONTEXT = "PROD_RULE_DATA_CONTEXT"; + // 上下文: 进料条码数据信息 + public static final String PRODUCTION_PS_IN_CONTEXT = "PRODUCTION_PS_IN_CONTEXT"; // 上下文: 产出条码数据信息 - public static final String OUT_PRODUCE_SN_DATA_CONTEXT = "OUT_PRODUCE_SN_DATA_CONTEXT"; - // 上下文: 装配件清单 - public static final String ASSEMBLY_DATA_CONTEXT = "ASSEMBLY_DATA_CONTEXT"; - // 上下文: 非排序产品加工规则信息 - public static final String PROD_RULE_NOSORT_DATA_CONTEXT = "PROD_RULE_NOSORT_DATA_CONTEXT"; + public static final String PRODUCTION_PS_OUT_CONTEXT = "PRODUCTION_PS_OUT_CONTEXT"; /*** * OPC