| | |
| | | private readonly ProductionOrderSubManager _productionOrderSubManager = |
| | | new(); |
| | | |
| | | private string ORDERNO = ""; |
| | | |
| | | |
| | | //ErpWYOrder |
| | | public bool Save(ErpWYOrder wyOrder) |
| | | { |
| | | var erpProductionOrderDto = wyOrder.OrderDto; |
| | | var mesRohIn = ConvertErpToProductionOrder(erpProductionOrderDto); |
| | | var mesRohIn = ConvertErpToProductionOrder(erpProductionOrderDto, wyOrder.Items[0].FBILLNO); |
| | | var mesRohInDatas = |
| | | ConvertErpToProductionOrderSub(wyOrder.Items); |
| | | |
| | |
| | | } |
| | | |
| | | private ProductionOrder ConvertErpToProductionOrder( |
| | | ErpProductionOrderDto erpDto) |
| | | ErpProductionOrderDto erpDto,string SUBBOM) |
| | | { |
| | | DateTime parsedDate; |
| | | |
| | |
| | | |
| | | var productionOrder = new ProductionOrder |
| | | { |
| | | OrderNo = erpDto.FBillNo, |
| | | OrderNo = SUBBOM, |
| | | Warehouse = erpDto.FStockID, |
| | | OrderDate = ParseDateTime(erpDto.FDate) ?? null, |
| | | OrderType = erpDto.FBillType, |
| | |
| | | Typea = erpDto.TypeA, |
| | | }; |
| | | |
| | | var single = base.GetSingle(it => it.ErpId == erpDto.FID); |
| | | var single = base.GetSingle(it => it.ErpProductionEntryCode == erpDto.FSUBENTRYID); |
| | | if (single != null) productionOrder.Guid = single.Guid; |
| | | |
| | | return productionOrder; |