| | |
| | | // 时间格式转换函数,ERP时间格式为 "yyyy-MM-dd HH:mm:ss.fff" |
| | | DateTime? ParseDateTime(string dateStr) |
| | | { |
| | | if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss.fff", |
| | | |
| | | string[] formats = new string[] |
| | | { |
| | | "yyyy-MM-dd HH:mm:ss.fff", |
| | | "yyyy-MM-dd HH:mm:ss", |
| | | "yyyy-MM-dd" |
| | | }; |
| | | |
| | | if (DateTime.TryParseExact(dateStr, formats, |
| | | CultureInfo.InvariantCulture, |
| | | DateTimeStyles.None, |
| | | out parsedDate)) |
| | |
| | | var productionOrderSub = new ProductionOrderSub |
| | | { |
| | | SequenceNo = Convert.ToInt32(erpDto.FSEQ), |
| | | MaterialCode = erpDto.FMaterialID2, |
| | | MaterialCode = erpDto.FMaterialID, |
| | | RequiredQty = Convert.ToDecimal(erpDto.FMustQty), |
| | | IssuedQty = Convert.ToDecimal(erpDto.FPickedQty), |
| | | LocationNo = erpDto.FPositionNO, |
| | |
| | | BatchNo = erpDto.FLot, |
| | | Warehouse = erpDto.FStockID, |
| | | IssuingMethod = erpDto.FIssueType, |
| | | Unit = erpDto.FUnitID2, |
| | | Unit2 = erpDto.FUnitID3, |
| | | Unit = erpDto.FUnitID, |
| | | Unit2 = erpDto.FUnitID, |
| | | SupplyingType = erpDto.FSupplyType, |
| | | Numerator = Convert.ToDecimal(erpDto.FNumerator), |
| | | Denominator = Convert.ToDecimal(erpDto.FDenominator), |
| | | CompositionQty = Convert.ToDecimal(erpDto.FNumerator) != 0 ? |
| | | Math.Round(Convert.ToDecimal(erpDto.FNumerator) / Convert.ToDecimal(erpDto.FDenominator), 2) : |
| | | 0, |
| | | ErpId = erpDto.FPPOMENTRYID, |
| | | ErpHeaderId = erpDto.FPPOMID, |
| | | FixedLoss = Convert.ToDecimal(erpDto.FFixScrapQty), |
| | |
| | | SubItemType = erpDto.FMaterialType, |
| | | ItemNo = erpDto.FReplaceGroup, |
| | | OwnerType = erpDto.FOwnerTypeId, |
| | | Owner = erpDto.FOwnerID2, |
| | | Owner = erpDto.FOwnerID, |
| | | Fisgetscrap = erpDto.FISGETSCRAP, |
| | | Fiskeycomponent = erpDto.FISKEYCOMPONENT, |
| | | Fsrctransorgid = erpDto.FSRCTRANSORGID, |