打印所有工序

master
philip 3 years ago
parent ad947ed227
commit 1fcd220c1d

@ -494,18 +494,20 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
}
//下道工序
Router router = routerService.getRouterBySfcBo(HandleEnum.SFC.getHandle(site, sfcServiceById.getSfc()));
int seq = 0;
if (router==null){
throw new BaseException("未找到当前工序");
}
List<RouterStepDto> stepOperationList = routerStepService.findRouterOperationByRouterBo(site, router.getHandle());
StringBuilder operationDesc = new StringBuilder();
for (int i = 0; i < stepOperationList.size(); i++) {
RouterStepDto stepOperation = stepOperationList.get(i);
if (stepOperation.getStepId().equals(prodReadyTask.getStepId())) {
seq = i;
}
operationDesc.append(stepOperation.getOperationDesc()) ;
if (i!=stepOperationList.size()-1){
operationDesc.append(",");
}
if (seq != stepOperationList.size() - 1) {
RouterStepDto stepOperation = stepOperationList.get(seq + 1);
labelPrintDto.setOperation(stepOperation.getOperationDesc());
}
labelPrintDto.setOperation(operationDesc.toString());
labelPrintDtoList.add(labelPrintDto);
printData = JSON.toJSONString(labelPrintDtoList);
//打印记录

Loading…
Cancel
Save