@ -178,21 +178,26 @@ public class MesWorkOrderCutCheckStepService extends BaseStepService {
List < List < StationKvBean > > dataList = new ArrayList < > ( ) ;
List < MesProductionPartContext > orderList = filterProductionPartContext ( productionPartContextList , true ) ;
List < MesProductionPartContext > finishCodeList = filterProductionPartContext ( productionPartContextList , false ) ;
//List<MesProductionPartContext> finishCodeList = filterProductionPartContext(productionPartContextList, false);
AtomicReference < Integer > index = new AtomicReference < > ( 0 ) ;
if ( ! CollectionUtils . isEmpty ( orderList ) ) {
// 腔数
int cavityQty = productionPartContextList . stream ( ) . collect ( Collectors . groupingBy ( MesProductionPartContext : : getPartNo ) ) . size ( ) ;
orderList . forEach ( o - > StationKvBeanUtil . addStationKvBeanList ( dataList , new ArrayList < > ( ) ,
new StationKvBean ( MesPcnExtConstWords . WORK_ORDER_NO , "裁片工单号" , o . getWorkOrderNo ( ) ) ,
new StationKvBean ( MesPcnExtConstWords . CUT_WORK_ORDER_NO , "裁片工单号" , o . getCutWorkOrderNo ( ) ) ,
new StationKvBean ( MesPcnExtConstWords . WORK_ORDER_NO , "工单号" , o . getWorkOrderNo ( ) ) ,
new StationKvBean ( MesPcnExtConstWords . PART_NO , "零件编码" , new StringJoiner ( MesPcnExtConstWords . SLANT_R ) . add ( o . getPartNo ( ) ) . toString ( ) ) ,
new StationKvBean ( MesPcnExtConstWords . QTY , "完成数/工单数" , new StringJoiner ( MesPcnExtConstWords . SLANT_R ) . add ( String . valueOf ( o . getCompleteQty ( ) . intValue ( ) ) ) . add ( String . valueOf ( o . getQty ( ) . intValue ( ) ) ) . toString ( ) ) ,
new StationKvBean ( MesPcnExtConstWords . CAVITY , "腔数" , new StringJoiner ( MesPcnExtConstWords . SLANT_R ) . add ( String . valueOf ( index . updateAndGet ( v - > v + 1 ) ) ) . add ( String . valueOf ( productionPartContextList. size ( ) ) ) . toString ( ) ) ) ) ;
new StationKvBean ( MesPcnExtConstWords . QTY , " 裁片工单数/ 完成数/工单数", new StringJoiner ( MesPcnExtConstWords . SLANT_R ) . add ( String . valueOf ( o . getCutQty ( ) . intValue ( ) ) ) . add ( String . valueOf ( o . getCompleteQty ( ) . intValue ( ) ) ) . add ( String . valueOf ( o . getQty ( ) . intValue ( ) ) ) . toString ( ) ) ,
new StationKvBean ( MesPcnExtConstWords . CAVITY , "腔数" , new StringJoiner ( MesPcnExtConstWords . SLANT_R ) . add ( String . valueOf ( index . updateAndGet ( v - > v + 1 ) ) ) . add ( String . valueOf ( cavityQty ) ) . toString ( ) ) ) ) ;
}
if ( ! CollectionUtils . isEmpty ( finishCodeList ) ) {
StationKvBeanUtil . addStationKvBeanList ( dataList , new ArrayList < > ( ) , new StationKvBean ( MesPcnExtConstWords . CAVITY_FINISH_CODE , "空腔数" , String . valueOf ( finishCodeList . size ( ) ) ) ) ;
}
//if (!CollectionUtils.isEmpty(finishCodeList)) {
// StationKvBeanUtil.addStationKvBeanList(dataList, new ArrayList<>(), new StationKvBean(MesPcnExtConstWords.CAVITY_FINISH_CODE, "空腔数", String.valueOf(finishCodeList.size())));
//}
return dataList ;
}
@ -354,7 +359,7 @@ public class MesWorkOrderCutCheckStepService extends BaseStepService {
workOrderList . stream ( ) . filter ( o - > null ! = o ) . forEach ( o - > {
MesProductionPartContext productionPartContext = new MesProductionPartContext ( )
. copyPartNo ( o , workOrderCutDetailMap . get ( o . getWorkOrderNo ( ) ) . getQty ( ) , equipVariableCollectContextList. get ( 0 ) . getMessageSource ( ) )
. copyPartNo ( o , workOrderCutDetailMap . get ( o . getWorkOrderNo ( ) ) . getQty ( ) , workOrderCutDetailMap. get ( o . getWorkOrderNo ( ) ) . getCutWorkOrderNo ( ) , equipVariableCollectContextList. get ( 0 ) . getMessageSource ( ) )
. isCheck ( productionProcessContext . getWorkCell ( ) ) ;
//if (equipVariableCollectContextList.get(0).getIsConsume().compareTo(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) == 0) productionPartContext.checkSeqResult(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
productionPartContext . setCutCode ( cutScheme . getCutCode ( ) ) ;