tags/yfai-pcn-ext-v1.0
微笑着面对明天 12 months ago
commit 634c922679

@ -5,6 +5,7 @@ import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesSortShippingCheckService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant; import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesSortShippingCheckModel; import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesSortShippingCheckModel;
import cn.estsh.i3plus.platform.common.convert.ConvertBean; import cn.estsh.i3plus.platform.common.convert.ConvertBean;
import cn.estsh.i3plus.platform.common.tool.TimeTool;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack; import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
@ -150,11 +151,17 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
//根据是否启动记忆判断 若启用记忆,则根据保存数据库 //根据是否启动记忆判断 若启用记忆,则根据保存数据库
if (orderManagement.getIsEnableMemory() == MesCommonConstant.TRUE_INTEGER) { if (orderManagement.getIsEnableMemory() == MesCommonConstant.TRUE_INTEGER) {
orderManagement.setStatus(MesExtEnumUtil.SHIPPING_ORDER_STATUS.SHIPPED.getValue()); //若发运单状态为创建或发布 则写入开始扫描时间
if (orderManagement.getStatus() == MesExtEnumUtil.SHIPPING_ORDER_STATUS.CREATE.getValue() ||
orderManagement.getStatus() == MesExtEnumUtil.SHIPPING_ORDER_STATUS.PUBLISHED.getValue()) {
orderManagement.setStartScanTime(TimeTool.getNowTime(true));
}
orderManagement.setStatus(MesExtEnumUtil.SHIPPING_ORDER_STATUS.SHIPPING.getValue());
ConvertBean.serviceModelUpdate(orderManagement, AuthUtil.getSessionUser().getUserName()); ConvertBean.serviceModelUpdate(orderManagement, AuthUtil.getSessionUser().getUserName());
shippingOrderManagementRepository.save(orderManagement); shippingOrderManagementRepository.save(orderManagement);
detail.setStatus(MesExtEnumUtil.SHIPPING_ORDER_DETAIL_SHIPPING_STATUS.SHIPPINGED.getValue()); detail.setStatus(MesExtEnumUtil.SHIPPING_ORDER_DETAIL_SHIPPING_STATUS.PUBLISHED.getValue());
ConvertBean.serviceModelUpdate(detail, AuthUtil.getSessionUser().getUserName()); ConvertBean.serviceModelUpdate(detail, AuthUtil.getSessionUser().getUserName());
shippingOrderManagementDetailRepository.save(detail); shippingOrderManagementDetailRepository.save(detail);
@ -277,9 +284,15 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
public void saveDate(MesShippingOrderManagement orderManagement, MesSortShippingCheckModel model, String org) { public void saveDate(MesShippingOrderManagement orderManagement, MesSortShippingCheckModel model, String org) {
//若发运单状态为创建或发布 则写入开始扫描时间
if (orderManagement.getStatus() == MesExtEnumUtil.SHIPPING_ORDER_STATUS.CREATE.getValue() ||
orderManagement.getStatus() == MesExtEnumUtil.SHIPPING_ORDER_STATUS.PUBLISHED.getValue()) {
orderManagement.setStartScanTime(TimeTool.getNowTime(true));
}
//发运单状态修改为校验完成 //发运单状态修改为校验完成
orderManagement.setStatus(MesExtEnumUtil.SHIPPING_ORDER_STATUS.SHIPPED.getValue()); orderManagement.setStatus(MesExtEnumUtil.SHIPPING_ORDER_STATUS.SHIPPED.getValue());
orderManagement.setEndScanTime(TimeTool.getNowTime(true));
//发运单明细状态修改为校验完成 //发运单明细状态修改为校验完成
DdlPackBean orderManagementDetailPackBean = DdlPackBean.getDdlPackBean(org); DdlPackBean orderManagementDetailPackBean = DdlPackBean.getDdlPackBean(org);
@ -288,6 +301,8 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
List<MesProduceSn> produceSnList = new ArrayList<>(); List<MesProduceSn> produceSnList = new ArrayList<>();
for (MesShippingOrderManagementDetail detail : orderManagementDetailList) { for (MesShippingOrderManagementDetail detail : orderManagementDetailList) {
detail.setActualQty(1);
detail.setStatus(MesExtEnumUtil.SHIPPING_ORDER_DETAIL_SHIPPING_STATUS.SHIPPINGED.getValue()); detail.setStatus(MesExtEnumUtil.SHIPPING_ORDER_DETAIL_SHIPPING_STATUS.SHIPPINGED.getValue());
ConvertBean.serviceModelUpdate(detail, AuthUtil.getSessionUser().getUserName()); ConvertBean.serviceModelUpdate(detail, AuthUtil.getSessionUser().getUserName());
@ -298,8 +313,7 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
MesProduceSn produceSn = produceSnRepository.getByProperty(packBean); MesProduceSn produceSn = produceSnRepository.getByProperty(packBean);
produceSn.setSnStatus(MesExtEnumUtil.PRODUCE_SN_STATUS.SHIPPED.getValue()); produceSn.setSnStatus(MesExtEnumUtil.PRODUCE_SN_STATUS.SHIPPED.getValue());
detail.setActualQty(1); ConvertBean.serviceModelUpdate(produceSn, AuthUtil.getSessionUser().getUserName());
ConvertBean.serviceModelUpdate(detail, AuthUtil.getSessionUser().getUserName());
produceSnList.add(produceSn); produceSnList.add(produceSn);
} }

@ -47,7 +47,7 @@ public class MesEquipmentLogExtService implements IMesEquipmentLogExtService {
DdlPreparedPack.getNumEqualPack(equipId, MesPcnExtConstWords.EQUIP_ID, packBean); DdlPreparedPack.getNumEqualPack(equipId, MesPcnExtConstWords.EQUIP_ID, packBean);
if (!CollectionUtils.isEmpty(clientHandleList) && clientHandleList.size() == 1) DdlPreparedPack.getNumEqualPack(clientHandleList.get(0), MesPcnExtConstWords.ID, packBean); if (!CollectionUtils.isEmpty(clientHandleList) && clientHandleList.size() == 1) DdlPreparedPack.getNumEqualPack(clientHandleList.get(0), MesPcnExtConstWords.ID, packBean);
else DdlPreparedPack.getInPackList(clientHandleList, MesPcnExtConstWords.ID, packBean); else DdlPreparedPack.getInPackList(clientHandleList, MesPcnExtConstWords.ID, packBean);
if (!StringUtils.isEmpty(needNewValue) && MesExtEnumUtil.EQUIP_VARIABLE_NEED_NEW_VALUE.TRUE.getValue() == needNewValue) DdlPreparedPack.getNumEqualPack(MesPcnExtConstWords.ZERO, MesPcnExtConstWords.EQUIP_VARIABLE_STATUS, packBean); if (!StringUtils.isEmpty(needNewValue) && MesExtEnumUtil.EQUIP_VARIABLE_NEED_NEW_VALUE.TRUE.getValue() == needNewValue) DdlPreparedPack.getNegativeNumEqualPack(MesPcnExtConstWords.ZERO, MesPcnExtConstWords.EQUIP_VARIABLE_STATUS, packBean);
return equipmentLogRepository.findByHqlWhere(packBean); return equipmentLogRepository.findByHqlWhere(packBean);
} }
@ -139,7 +139,7 @@ public class MesEquipmentLogExtService implements IMesEquipmentLogExtService {
if (CollectionUtils.isEmpty(clientHandleList)) clientHandleList = new ArrayList<>(); if (CollectionUtils.isEmpty(clientHandleList)) clientHandleList = new ArrayList<>();
clientHandleList.addAll(equipVariableCfgCollectContext.getClientHandleList()); clientHandleList.addAll(equipVariableCfgCollectContext.getClientHandleList());
} }
return CollectionUtils.isEmpty(clientHandleList) ? null : clientHandleList.stream().filter(o -> StringUtils.isEmpty(o)).distinct().collect(Collectors.toList()); return CollectionUtils.isEmpty(clientHandleList) ? null : clientHandleList.stream().filter(o -> !StringUtils.isEmpty(o)).distinct().collect(Collectors.toList());
} }
} }

@ -15,7 +15,7 @@ import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* *
*/ */
@Slf4j @Slf4j
@Service @Service

@ -178,7 +178,7 @@ public class MesFirstMouldNoReadStepService extends BaseStepService {
//零件信息缺失 抛出异常 //零件信息缺失 抛出异常
List<String> filterList = CollectionUtils.isEmpty(finalPartDataMap) ? null : partNoList.stream().filter(o -> (null != o && !finalPartDataMap.containsKey(o))).collect(Collectors.toList()); List<String> filterList = CollectionUtils.isEmpty(finalPartDataMap) ? null : partNoList.stream().filter(o -> (null != o && !finalPartDataMap.containsKey(o))).collect(Collectors.toList());
if (CollectionUtils.isEmpty(partDataMap) || !CollectionUtils.isEmpty(filterList)) execExpSendMsgAndThrowEx(reqBean, resultBean, String.format("请检查零件信息,零件编码%s信息不存在!", CollectionUtils.isEmpty(finalPartDataMap) ? partNoList.toString() : filterList.toString())); if (CollectionUtils.isEmpty(finalPartDataMap) || !CollectionUtils.isEmpty(filterList)) execExpSendMsgAndThrowEx(reqBean, resultBean, String.format("请检查零件信息,零件编码%s信息不存在!", CollectionUtils.isEmpty(finalPartDataMap) ? partNoList.toString() : filterList.toString()));
return finalPartDataMap; return finalPartDataMap;

@ -213,7 +213,7 @@ public class MesProductionProcessContextStepService extends BaseStepService impl
@Override @Override
public List<String> collectCategoryLevelTwoList(List<MesEquipmentVariableCfg> equipmentVariableCfgList) { public List<String> collectCategoryLevelTwoList(List<MesEquipmentVariableCfg> equipmentVariableCfgList) {
return CollectionUtils.isEmpty(equipmentVariableCfgList) ? null : return CollectionUtils.isEmpty(equipmentVariableCfgList) ? null :
(equipmentVariableCfgList.stream().filter(o -> null != o).map(MesEquipmentVariableCfg::getCategoryLevelTwo).collect(Collectors.toList())).stream().filter(o -> StringUtils.isEmpty(o)).distinct().collect(Collectors.toList()); (equipmentVariableCfgList.stream().filter(o -> null != o).map(MesEquipmentVariableCfg::getCategoryLevelTwo).collect(Collectors.toList())).stream().filter(o -> !StringUtils.isEmpty(o)).distinct().collect(Collectors.toList());
} }
@Override @Override
@ -315,7 +315,7 @@ public class MesProductionProcessContextStepService extends BaseStepService impl
List<StationKvBean> lastScanContext = getCachedLastScanContext(reqBean); List<StationKvBean> lastScanContext = getCachedLastScanContext(reqBean);
StationKvBeanUtil.addStationKvBeanLimix100ThenHalf(lastScanContext, new StationKvBean().name(source.getDescription()).value(scanInfo)); lastScanContext = StationKvBeanUtil.addStationKvBeanLimix100ThenHalf(lastScanContext, new StationKvBean().name(source.getDescription()).value(scanInfo));
doCacheLastScanContext(reqBean, lastScanContext); doCacheLastScanContext(reqBean, lastScanContext);

@ -271,13 +271,13 @@ public class MesProductionProcessContext {
//上下文赋值加工结果 //上下文赋值加工结果
public MesProductionProcessContext productResult(String productResult) { public MesProductionProcessContext productResult(String productResult) {
this.equipVariableJson = productResult; this.productResult = productResult;
return this; return this;
} }
//上下文清除加工结果 //上下文清除加工结果
public MesProductionProcessContext productResultClear() { public MesProductionProcessContext productResultClear() {
this.equipVariableJson = null; this.productResult = null;
return this; return this;
} }

Loading…
Cancel
Save