| | |
| | | { |
| | | DateTime parsedDate; |
| | | |
| | | // 时间格式转换函数,ERP时间格式为 "yyyy-MM-dd HH:mm:ss.fff" |
| | | // 时间格式转换函数,ERP时间格式为 "yyyy-MM-dd HH:mm:ss" |
| | | DateTime? ParseDateTime(string dateStr) |
| | | { |
| | | if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss.fff", |
| | | if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss", |
| | | CultureInfo.InvariantCulture, |
| | | DateTimeStyles.None, |
| | | out parsedDate)) |
| | |
| | | WorkOrderQty = Convert.ToDouble(erpDto.FQty), |
| | | PlanningGroup = erpDto.FWorkGroupId, |
| | | Planner = erpDto.FPlannerID, |
| | | EstimatedStartTime = |
| | | PlanStartDate = |
| | | ParseDateTime(erpDto.FPlanStartDate) ?? null, |
| | | EstimatedEndTime = |
| | | PlanFinishDate = |
| | | ParseDateTime(erpDto.FPlanFinishDate) ?? null, |
| | | StorageUpperLimit = Convert.ToDouble(erpDto.FStockInLimitH), |
| | | StorageLowerLimit = Convert.ToDouble(erpDto.FStockInLimitL), |