Merge branch 'dev-wuhan' of http://git.estsh.com/I3-YF/i3plus-mes-pcn-yfai into dev-wuhan

tags/yfai-pcn-ext-v2.3
王杰 9 months ago
commit 51bf7e01ec

@ -57,6 +57,9 @@ public class WorkOrderAssemblyPrintQueueStrategyService implements IPrintQueueSt
@Autowired @Autowired
private IMesWorkCenterService workCenterService; private IMesWorkCenterService workCenterService;
@Autowired
private IMesPrintedSnLogRepository printedSnLogRepository;
@Override @Override
public List<MesPrintQueue> execute(MesPrintQueue model) { public List<MesPrintQueue> execute(MesPrintQueue model) {
@ -93,6 +96,9 @@ public class WorkOrderAssemblyPrintQueueStrategyService implements IPrintQueueSt
// 展示打印队列列表 // 展示打印队列列表
List<MesPrintQueue> showPrintQueueList = new ArrayList<>(); List<MesPrintQueue> showPrintQueueList = new ArrayList<>();
// 条码打印记录
List<MesPrintedSnLog> printedSnLogList = new ArrayList<>();
for (MesPrintQueue printQueue : printQueueList) { for (MesPrintQueue printQueue : printQueueList) {
MesWorkOrder mesWorkOrder = workOrderMapByWorkOrderNo.get(printQueue.getWorkOrderNo()); MesWorkOrder mesWorkOrder = workOrderMapByWorkOrderNo.get(printQueue.getWorkOrderNo());
@ -168,10 +174,19 @@ public class WorkOrderAssemblyPrintQueueStrategyService implements IPrintQueueSt
showPrintQueueList.add(printQueue); showPrintQueueList.add(printQueue);
MesPrintedSnLog printedSnLog = new MesPrintedSnLog();
printedSnLog.setOrganizeCode(printQueue.getOrganizeCode());
printedSnLog.setWorkOrderNo(printQueue.getWorkOrderNo());
printedSnLog.setCustPartNo(printQueue.getCustPartNo());
ConvertBean.serviceModelInitialize(printedSnLog, "JOB");
printedSnLogList.add(printedSnLog);
} }
printQueueRepository.saveAll(printQueueList); printQueueRepository.saveAll(printQueueList);
if (!CollectionUtils.isEmpty(printedSnLogList)) printedSnLogRepository.saveAll(printedSnLogList);
return showPrintQueueList; return showPrintQueueList;
} }

@ -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