コード例 #1
0
ファイル: DocumentBuilder.java プロジェクト: jincieryi/mes
 private void createResources(Entity savedDocument) {
   DocumentType documentType = DocumentType.of(savedDocument);
   if (DocumentType.RECEIPT.equals(documentType)
       || DocumentType.INTERNAL_INBOUND.equals(documentType)) {
     resourceManagementService.createResourcesForReceiptDocuments(savedDocument);
   } else if (DocumentType.INTERNAL_OUTBOUND.equals(documentType)
       || DocumentType.RELEASE.equals(documentType)) {
     resourceManagementService.updateResourcesForReleaseDocuments(savedDocument);
   } else if (DocumentType.TRANSFER.equals(documentType)) {
     resourceManagementService.moveResourcesForTransferDocument(savedDocument);
   } else {
     throw new IllegalStateException("Unsupported document type");
   }
 }
コード例 #2
0
ファイル: DocumentBuilder.java プロジェクト: jincieryi/mes
 public DocumentBuilder release(Entity locationFrom) {
   document.setField(DocumentFields.LOCATION_FROM, locationFrom);
   document.setField(DocumentFields.TYPE, DocumentType.RELEASE.getStringValue());
   return this;
 }