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 cac4e4d..e1c6b0f 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 @@ -85,7 +85,7 @@ public interface IMesProductionDispatchContextStepService { Boolean saveProductionPartContext(StationRequestBean reqBean, List productionPartContextList); @ApiOperation(value = "删除上下文产出零件信息") - void deleteProductionPartContext(StationRequestBean reqBean); + Boolean deleteProductionPartContext(StationRequestBean reqBean); @ApiOperation(value = "获取上下文零件数据信息") Map getPartDataContext(StationRequestBean reqBean); @@ -154,7 +154,7 @@ public interface IMesProductionDispatchContextStepService { Boolean saveProductionPsInContext(StationRequestBean reqBean, List productionPsInContextList); @ApiOperation(value = "删除进料主条码数据") - void deleteProductionPsInContext(StationRequestBean reqBean); + Boolean deleteProductionPsInContext(StationRequestBean reqBean); @ApiOperation(value = "获取上下文产出条码数据信息集合") List getProductionPsOutContext(StationRequestBean reqBean); 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 8c83e13..e0e9b58 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 @@ -4,22 +4,18 @@ import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepSer 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.mes.bean.MesPart; import cn.estsh.i3plus.pojo.mes.bean.MesRawPartCharging; import cn.estsh.i3plus.pojo.mes.model.StationKvBean; import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; -import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; -import com.google.common.base.Objects; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; -import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.StringJoiner; @@ -163,31 +159,32 @@ public class MesProductionDispatchContextStepService extends BaseStepService imp deleteFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.FIRST_MOULD_NO_CONTEXT); } - //获取上下文一模多腔信息 + //获取上下文产出零件信息 @Override public List getProductionPartContext(StationRequestBean reqBean) { String productionPartJson = getFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PART_CONTEXT); return !StringUtils.isEmpty(productionPartJson) ? JSONObject.parseArray(productionPartJson, MesProductionPartContext.class) : null; } - //验证上下文一模多腔信息是否存在 + //验证上下文产出零件信息是否存在 @Override public Boolean checkProductionPartIsExistContext(StationRequestBean reqBean) { String productionPartJson = getFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PART_CONTEXT); return !StringUtils.isEmpty(productionPartJson) ? true : false; } - //保存上下文一模多腔信息 [JSON]List + //保存上下文产出零件信息 [JSON]List @Override public Boolean saveProductionPartContext(StationRequestBean reqBean, List productionPartContextList) { - if (CollectionUtils.isEmpty(productionPartContextList)) return false; + if (CollectionUtils.isEmpty(productionPartContextList)) return deleteProductionPartContext(reqBean); return saveFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PART_CONTEXT, JSONObject.toJSONString(productionPartContextList)); } - //删除上下文一模多腔信息 + //删除上下文产出零件信息 @Override - public void deleteProductionPartContext(StationRequestBean reqBean) { + public Boolean deleteProductionPartContext(StationRequestBean reqBean) { deleteFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PART_CONTEXT); + return true; } //获取上下文零件数据信息 @@ -335,14 +332,15 @@ public class MesProductionDispatchContextStepService extends BaseStepService imp //保存上下文进料主条码数据信息集合 [JSON]List @Override public Boolean saveProductionPsInContext(StationRequestBean reqBean, List productionPsInContextList) { - if (CollectionUtils.isEmpty(productionPsInContextList)) return false; + if (CollectionUtils.isEmpty(productionPsInContextList)) return deleteProductionPsInContext(reqBean); return saveFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_IN_CONTEXT, JSONObject.toJSONString(productionPsInContextList)); } //删除上下文进料主条码数据信息集合 @Override - public void deleteProductionPsInContext(StationRequestBean reqBean) { + public Boolean deleteProductionPsInContext(StationRequestBean reqBean) { deleteFsmBusiData(reqBean.getOrganizeCode(), getContextKey(reqBean), MesPcnExtConstWords.PRODUCTION_PS_IN_CONTEXT); + return true; } //获取上下文产出条码数据信息集合