| | |
| | | var log = JsonConvert.SerializeObject(model); |
| | | if (model != null) |
| | | { |
| | | model.EXPIRATION = System.DateTime.Now.AddMinutes(GetExportTime(model.SPEC)); |
| | | model.EXPIRATION = System.DateTime.Now.AddHours(GetExportTime(model.SPEC)); |
| | | |
| | | if (db.Insertable<TN_EquipProDetail>(model).ExecuteCommand() > 0) |
| | | { |
| | |
| | | { |
| | | db.Deleteable<TN_InventoryM>(target).ExecuteCommand(); |
| | | } |
| | | model.EXPIRATION = System.DateTime.Now.AddMinutes(GetExportTime(model.SPEC)); |
| | | model.EXPIRATION = System.DateTime.Now.AddHours(GetExportTime(model.SPEC)); |
| | | if (db.Insertable<TN_InventoryM>(model).ExecuteCommand() > 0) |
| | | { |
| | | LogHelper.Info($"插入WMS库存明细成功,{log}"); |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 计算时间差 |
| | | /// </summary> |
| | | /// <param name="start"></param> |
| | | /// <param name="end"></param> |
| | | /// <returns></returns> |
| | | public static int CalculateDaysDifference(DateTime start, DateTime end) |
| | | { |
| | | try |
| | |
| | | return 0; |
| | | } |
| | | |
| | | // 获取总天数(包括小数部分) |
| | | double totalDays = difference.TotalDays; |
| | | |
| | | // 获取总小时数(包括小数部分) |
| | | double totalHours = difference.TotalHours; |
| | | |
| | | // 向上取整 |
| | | return (int)Math.Ceiling(totalDays); |
| | | return (int)Math.Ceiling(totalHours); |
| | | } |
| | | catch (Exception ex) |
| | | { |