装配目视单打印

tags/yfai-pcn-ext-v2.3
yxw 8 months ago
parent 413f68de13
commit 16ee98410f

@ -90,9 +90,9 @@ public class AssemblyVisualListPrintStrategy implements IPrintTemplateStrategySe
// 为空时显示内容 // 为空时显示内容
String isNullViewContent = StringUtils.isEmpty(partProdGroup.getIsNullViewContent()) ? "" : partProdGroup.getIsNullViewContent(); String isNullViewContent = StringUtils.isEmpty(partProdGroup.getIsNullViewContent()) ? "" : partProdGroup.getIsNullViewContent();
for (Integer index = 0; index < totalCount; index++) { for (Integer index = 0; index < totalCount; index++) {
String displayValue = workOrderAssemblyList.size() -1 < index ? isNullViewContent : workOrderAssemblyList.get(0).getDisplayValue(); String displayValue = workOrderAssemblyList.size() -1 < index ? isNullViewContent : workOrderAssemblyList.get(index).getDisplayValue();
resultMap.put(MesPcnExtConstWords.ASSEMBLY_PARAM + (index+1), StringUtils.isEmpty(displayValue) ? "" : displayValue); resultMap.put(MesPcnExtConstWords.ASSEMBLY_PARAM + (index+1), StringUtils.isEmpty(displayValue) ? StringUtils.isEmpty(isNullViewContent) ? "" : isNullViewContent : displayValue);
} }
printDataMapList.add(resultMap); printDataMapList.add(resultMap);

@ -178,21 +178,26 @@ public class MesWorkOrderCutCheckStepService extends BaseStepService {
List<List<StationKvBean>> dataList = new ArrayList<>(); List<List<StationKvBean>> dataList = new ArrayList<>();
List<MesProductionPartContext> orderList = filterProductionPartContext(productionPartContextList, true); List<MesProductionPartContext> orderList = filterProductionPartContext(productionPartContextList, true);
List<MesProductionPartContext> finishCodeList = filterProductionPartContext(productionPartContextList, false); //List<MesProductionPartContext> finishCodeList = filterProductionPartContext(productionPartContextList, false);
AtomicReference<Integer> index = new AtomicReference<>(0); AtomicReference<Integer> index = new AtomicReference<>(0);
if (!CollectionUtils.isEmpty(orderList)) { if (!CollectionUtils.isEmpty(orderList)) {
// 腔数
int cavityQty = productionPartContextList.stream().collect(Collectors.groupingBy(MesProductionPartContext::getPartNo)).size();
orderList.forEach(o -> StationKvBeanUtil.addStationKvBeanList(dataList, new ArrayList<>(), 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.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.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(productionPartContextList.size())).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)) { //if (!CollectionUtils.isEmpty(finishCodeList)) {
StationKvBeanUtil.addStationKvBeanList(dataList, new ArrayList<>(), new StationKvBean(MesPcnExtConstWords.CAVITY_FINISH_CODE, "空腔数", String.valueOf(finishCodeList.size()))); // StationKvBeanUtil.addStationKvBeanList(dataList, new ArrayList<>(), new StationKvBean(MesPcnExtConstWords.CAVITY_FINISH_CODE, "空腔数", String.valueOf(finishCodeList.size())));
} //}
return dataList; return dataList;
} }
@ -354,7 +359,7 @@ public class MesWorkOrderCutCheckStepService extends BaseStepService {
workOrderList.stream().filter(o -> null != o).forEach(o -> { workOrderList.stream().filter(o -> null != o).forEach(o -> {
MesProductionPartContext productionPartContext = new MesProductionPartContext() 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()); .isCheck(productionProcessContext.getWorkCell());
//if (equipVariableCollectContextList.get(0).getIsConsume().compareTo(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) == 0) productionPartContext.checkSeqResult(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); //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()); productionPartContext.setCutCode(cutScheme.getCutCode());

@ -37,6 +37,9 @@ public class MesProductionPartContext implements Serializable {
@ApiParam("客户零件号") @ApiParam("客户零件号")
private String custPartNo; private String custPartNo;
@ApiParam("裁片工单数量")
private Double cutQty;
@ApiParam("工单数量") @ApiParam("工单数量")
private Double qty; private Double qty;
@ -114,6 +117,9 @@ public class MesProductionPartContext implements Serializable {
// 裁片功能 // 裁片功能
@ApiParam("裁片方案代码") @ApiParam("裁片方案代码")
private String cutCode; private String cutCode;
@ApiParam("裁片工单号")
private String cutWorkOrderNo;
// 裁片功能 // 裁片功能
//根据一模多腔赋值 //根据一模多腔赋值
@ -139,12 +145,13 @@ public class MesProductionPartContext implements Serializable {
return messageSource(messageSource); return messageSource(messageSource);
} }
//根据工单信息赋值 //根据工单信息、裁片工单明细赋值
public MesProductionPartContext copyPartNo(MesWorkOrder workOrder, Double qty, Integer messageSource) { public MesProductionPartContext copyPartNo(MesWorkOrder workOrder, Double cutQty, String cutWorkOrderNo, Integer messageSource) {
if (null != workOrder) { if (null != workOrder) {
BeanUtils.copyProperties(workOrder, this); BeanUtils.copyProperties(workOrder, this);
if (StringUtils.isEmpty(this.completeQty)) this.completeQty = new Double(0); if (StringUtils.isEmpty(this.completeQty)) this.completeQty = new Double(0);
this.setQty(qty); this.setCutQty(cutQty);
this.setCutWorkOrderNo(cutWorkOrderNo);
} else this.isFinishCode = CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(); } else this.isFinishCode = CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue();
return messageSource(messageSource); return messageSource(messageSource);
} }

Loading…
Cancel
Save