예제 #1
0
 public string GetGraphizString(ProductionOrderOperation productionOrderOperation)
 {
     return($"Operation;{productionOrderOperation.GetId()};\\n{productionOrderOperation.GetValue().Name};\\n" +
            $"bs({productionOrderOperation.GetValue().StartBackward});" +
            $"be({productionOrderOperation.GetValue().EndBackward});");
 }
예제 #2
0
        public ProductionOrderBoms GetAllProductionOrderBomsBy(
            ProductionOrderOperation productionOrderOperation)
        {
            List <T_ProductionOrderBom> productionOrderBoms = _dbTransactionData
                                                              .ProductionOrderBomGetAll().GetAllAs <T_ProductionOrderBom>().FindAll(x =>
                                                                                                                                    x.ProductionOrderOperationId.Equals(productionOrderOperation.GetId()
                                                                                                                                                                        .GetValue()));

            if (productionOrderBoms == null || productionOrderBoms.Any() == false)
            {
                throw new MrpRunException(
                          $"How could an productionOrderOperation({productionOrderOperation}) without an T_ProductionOrderBom exists?");
            }

            return(new ProductionOrderBoms(productionOrderBoms));
        }
예제 #3
0
 public Ids GetProductionOrderBomsBy(ProductionOrderOperation operation)
 {
     return(_operationToBom[operation.GetId()]);
 }
예제 #4
0
        public ProductionOrderBom GetAnyProductionOrderBomByProductionOrderOperation(
            ProductionOrderOperation productionOrderOperation)
        {
            T_ProductionOrderBom productionOrderBom = _dbTransactionData.ProductionOrderBomGetAll()
                                                      .GetAllAs <T_ProductionOrderBom>().Find(x =>
                                                                                              x.ProductionOrderOperationId.Equals(productionOrderOperation.GetId()
                                                                                                                                  .GetValue()));

            if (productionOrderBom == null)
            {
                throw new MrpRunException(
                          "How could an productionOrderOperation without an T_ProductionOrderBom exists?");
            }

            return(new ProductionOrderBom(productionOrderBom));
        }