| | |
| | | //return [moment(startOfWeek,"YYYY-MM-DD HH:mm"), moment(endOfWeek,"YYYY-MM-DD HH:mm")]; |
| | | //return [moment(startOfWeek), moment(endOfWeek)]; |
| | | |
| | | // const startStr = formatDateV2(startOfWeek,'YYYY-MM-DD HH:mm:ss'); |
| | | // const endStr = formatDateV2(endOfWeek,'YYYY-MM-DD HH:mm:ss'); |
| | | const startStr = formatDateV2(startOfWeek,'YYYY-MM-DD HH:mm:ss'); |
| | | const endStr= formatDateV2(endOfWeek,'YYYY-MM-DD HH:mm:ss'); |
| | | //return [new Date(startStr), new Date(endStr)]; |
| | | // const startStr = formatDateV2(startOfWeek, 'yyyy-MM-dd HH:mm:ss'); |
| | | // const endStr = formatDateV2(endOfWeek, 'yyyy-MM-dd HH:mm:ss'); |
| | | // return [startStr, endStr]; |
| | | //alert(startStr); |
| | | return [startStr, endStr]; |
| | | |
| | | // â
ç´æ¥è¿å Date å¯¹è±¡çæ°ç» |
| | | return [startOfWeek, endOfWeek]; |
| | | //return [startOfWeek, endOfWeek]; |
| | | //*/ |
| | | } |
| | |
| | | { |
| | | string msg = ""; |
| | | string result = ""; |
| | | |
| | | |
| | | // return form.textBox7.Text.Trim(); |
| | | var logTitle = GetSapLog("moveStockConfirm", "ç§»åºç¡®è®¤", moveList); |
| | | try |
| | |
| | | Log4NetHelper.WriteInfoLog(LogType.SAPService, "å¼å§æ¨é" + logTitle); |
| | | MovMaterialEntity[] results = JsonConvert.DeserializeObject<MovMaterialEntity[]>(moveList); |
| | | //ConfirmMOV |
| | | result = sendSap.ConfirmMOV(results, out msg); |
| | | result = sendSap.ConfirmMOV(results, out msg); |
| | | |
| | | if (msg == "") |
| | | { |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MovMaterialEntity[] results2 = JsonConvert.DeserializeObject<MovMaterialEntity[]>(moveList); |
| | | SapSendFailRecodInfoHandler.AddForMove(results2, result, msg);//å¢å [EditBy shaocx,2022-02-22] |
| | | //失败åï¼ä¸åæ¨éï¼çæ¥å¿å³å¯ ãEditby shaocx,2025-09-18ã |
| | | //MovMaterialEntity[] results2 = JsonConvert.DeserializeObject<MovMaterialEntity[]>(moveList); |
| | | //SapSendFailRecodInfoHandler.AddForMove(results2, result, msg);//å¢å [EditBy shaocx,2022-02-22] |
| | | |
| | | Log4NetHelper.WriteInfoLog(LogType.SAPService, "æ¨éå¼å¸¸:" + logTitle + ",è¿åç»æ:" + msg + ",å¼å¸¸:" + ex.Message); |
| | | Log4NetHelper.WriteErrorLog(LogType.SAPService, "æ¨éå¼å¸¸:" + logTitle + ",è¿åç»æ:" + msg + ",å¼å¸¸:" + ex.Message, ex); |
| | | var data = new |
| | |
| | | Log4NetHelper.WriteInfoLog(LogType.SAPService, "æ¨éå¼å¸¸:" + logTitle + ",è¿åç»æ:" + msg + ",å¼å¸¸:" + ex.Message); |
| | | Log4NetHelper.WriteErrorLog(LogType.SAPService, "æ¨éå¼å¸¸:" + logTitle + ",è¿åç»æ:" + msg + ",å¼å¸¸:" + ex.Message, ex); |
| | | |
| | | SapSendFailRecodInfoHandler.AddForOutStore(results, "WMSæåºå¼å¸¸", "WMSæåºå¼å¸¸:" + ex.Message);//è®°å½å¤±è´¥è¡¨ |
| | | //失败åï¼ä¸åæ¨éï¼çæ¥å¿å³å¯ ãEditby shaocx,2025-09-18ã |
| | | //SapSendFailRecodInfoHandler.AddForOutStore(results, "WMSæåºå¼å¸¸", "WMSæåºå¼å¸¸:" + ex.Message);//è®°å½å¤±è´¥è¡¨ |
| | | |
| | | var data = new |
| | | { |
| | | result = false, |
| | |
| | | msg = "WMSå¼å¸¸:" + ex.Message; |
| | | Log4NetHelper.WriteInfoLog(LogType.SAPService, "æ¨éå¼å¸¸:" + logTitle + ",è¿åç»æ:" + msg + ",å¼å¸¸:" + ex.Message); |
| | | Log4NetHelper.WriteErrorLog(LogType.SAPService, "æ¨éå¼å¸¸:" + logTitle + ",è¿åç»æ:" + msg + ",å¼å¸¸:" + ex.Message, ex); |
| | | SapSendFailRecodInfoHandler.AddForReverser(res, result, msg);//è®°å½å¤±è´¥è¡¨ [Editby shaocx,2025-06-13] |
| | | |
| | | //失败åï¼ä¸åæ¨éï¼çæ¥å¿å³å¯ ãEditby shaocx,2025-09-18ã |
| | | //SapSendFailRecodInfoHandler.AddForReverser(res, result, msg);//è®°å½å¤±è´¥è¡¨ [Editby shaocx,2025-06-13] |
| | | |
| | | return msg; |
| | | } |
| | | } |
| | |
| | | msg = "WMSå¼å¸¸:" + ex.Message; |
| | | Log4NetHelper.WriteInfoLog(LogType.SAPService, "æ¨éå¼å¸¸:" + logTitle + ",è¿åç»æ:" + msg + ",å¼å¸¸:" + ex.Message); |
| | | Log4NetHelper.WriteErrorLog(LogType.SAPService, "æ¨éå¼å¸¸:" + logTitle + ",è¿åç»æ:" + msg + ",å¼å¸¸:" + ex.Message, ex); |
| | | SapSendFailRecodInfoHandler.AddForSH(results, info, msg);//è®°å½å¤±è´¥è¡¨ [Editby shaocx,2025-06-13] |
| | | |
| | | //失败åï¼ä¸åæ¨éï¼çæ¥å¿å³å¯ ãEditby shaocx,2025-09-18ã |
| | | //SapSendFailRecodInfoHandler.AddForSH(results, info, msg);//è®°å½å¤±è´¥è¡¨ [Editby shaocx,2025-06-13] |
| | | |
| | | return false; |
| | | } |
| | | } |
| | |
| | | totalInfo.list11[1] = outTaskCount.Count; |
| | | } |
| | | |
| | | //æ´æ¹æ°é ãEditby shaocx,2024-11-22ã |
| | | /* |
| | | if (stockUsingCount != null) |
| | | { |
| | | decimal cout = stockUsingCount.Count / 1140M * 100; |
| | | totalInfo.list11[2] = Convert.ToInt32(cout); |
| | | } |
| | | if (outTimeStockCount != null) |
| | | { |
| | | totalInfo.list11[3] = outTimeStockCount.Count; |
| | | } |
| | | //*/ |
| | | |
| | | totalInfo.list11[2] = 1152; |
| | | totalInfo.list11[3] = 1152 - stockUsingCount.Count(); |
| | | |
| | | if (lastHour != today.Hour) |
| | | //int aaaa = 1; |
| | | //if (aaaa == 2) |
| | | { |
| | | //æ¯éä¸å°æ¶ä¿å䏿¬¡è®¾å¤ç¶ææ¶é´ |
| | | lastHour = today.Hour; |
| | |
| | | } |
| | | else |
| | | { |
| | | //todayDeviceInfo.deviceWaitTime = deviceWaitTime.TotalMinutes > 0 ? Convert.ToDecimal(deviceWaitTime.TotalMinutes) : 0M;// deviceWaitTime.Hours * 60M + deviceWaitTime.Minutes; |
| | | |
| | | todayDeviceInfo.deviceRunTime = deviceRunTime.TotalMinutes > 0 ? Convert.ToDecimal(deviceRunTime.TotalMinutes) : 0M; |
| | | todayDeviceInfo.deviceAlarmTime = deviceAlarmTime.TotalMinutes > 0 ? Convert.ToDecimal(deviceAlarmTime.TotalMinutes) : 0M; |
| | | //éæ°è®¡ç®è®¾å¤çå¾
æ¶é´ ãEditby shaocx,2024-12-30ã |
| | |
| | | todayDeviceInfo.taskEnterCount = enterTaskCount.Count;//å
¥åºä»»å¡æ° |
| | | todayDeviceInfo.taskOutCount = outTaskCount.Count;//åºåºä»»å¡æ° |
| | | //æ´æ¹æ°é ãEditby shaocx,2024-11-22ã |
| | | //decimal cout = stockUsingCount.Count / 1140M * 100; |
| | | decimal cout = stockUsingCount.Count / 1152M * 100; |
| | | todayDeviceInfo.stockProportion = Convert.ToInt32(cout);//已使ç¨çåºä½ |
| | | todayDeviceInfo.outDate = outTimeStockCount.Count;//è¿ææ¶é´å°äºä¸ä¸ªæçåºåæ°æ® |
| | |
| | | //éæ°è®¡ç®è®¾å¤çå¾
æ¶é´ ãEditby shaocx,2024-12-30ã |
| | | todayDeviceInfo.deviceWaitTime = 1440 - (todayDeviceInfo.deviceRunTime + todayDeviceInfo.deviceAlarmTime); |
| | | } |
| | | private void CommonCalcWaitTime(ref deviceGeneralInfoForDetail todayDeviceInfo) |
| | | { |
| | | //éæ°è®¡ç®è®¾å¤çå¾
æ¶é´ ãEditby shaocx,2024-12-30ã |
| | | todayDeviceInfo.deviceWaitTime = 1440 - (todayDeviceInfo.deviceRunTime + todayDeviceInfo.deviceAlarmTime); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | |
| | | public virtual DbSet<SapSendInfo> SapSendInfo { get; set; } |
| | | public virtual DbSet<TakeStock> TakeStock { get; set; } |
| | | public virtual DbSet<deviceGeneralInfo> deviceGeneralInfo { get; set; } |
| | | public virtual DbSet<deviceGeneralInfoForDetail> deviceGeneralInfoForDetail { get; set; } |
| | | public virtual DbSet<Sys_User_Log> Sys_User_Log { get; set; } |
| | | public virtual DbSet<OutInStockTask> OutInStockTask { get; set; } |
| | | public virtual DbSet<VmaterialInfo> VmaterialInfo { get; set; } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace wcftest.orm |
| | | { |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.ComponentModel.DataAnnotations.Schema; |
| | | using System.Data.Entity.Spatial; |
| | | |
| | | /// <summary> |
| | | /// æ´ç»è´ç设å¤ç¶æçæ§è¡¨ ãEditby shaocx,2025-09-18ã |
| | | /// </summary> |
| | | |
| | | [Table("deviceGeneralInfoForDetail")] |
| | | public partial class deviceGeneralInfoForDetail |
| | | { |
| | | public int id { get; set; } |
| | | |
| | | public int? taskEnterCount { get; set; } |
| | | |
| | | public int? taskOutCount { get; set; } |
| | | |
| | | public int? stockProportion { get; set; } |
| | | |
| | | public int? outDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¿è¡æ¶é´ |
| | | /// </summary> |
| | | public decimal? deviceRunTime { get; set; } |
| | | /// <summary> |
| | | /// çå¾
æ¶é´ |
| | | /// </summary> |
| | | public decimal? deviceWaitTime { get; set; } |
| | | /// <summary> |
| | | /// æ¥è¦æ¶é´ |
| | | /// </summary> |
| | | public decimal? deviceAlarmTime { get; set; } |
| | | |
| | | public DateTime? createTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½¦å· |
| | | /// </summary> |
| | | [StringLength(50)] |
| | | public string ext1 { get; set; } |
| | | |
| | | [StringLength(50)] |
| | | public string ext2 { get; set; } |
| | | |
| | | [StringLength(50)] |
| | | public string ext3 { get; set; } |
| | | |
| | | [StringLength(50)] |
| | | public string ext4 { get; set; } |
| | | } |
| | | } |
| | |
| | | if (page.datatime.Length == 2) |
| | | { |
| | | |
| | | StockWhere = StockWhere + " and creatTime > '" + page.datatime[0].ToString() + "' and creatTime < '" + page.datatime[1].ToString() + "'"; |
| | | StockWhere = StockWhere + " and CreateTime > '" + page.datatime[0].ToString() + "' and CreateTime < '" + page.datatime[1].ToString() + "'"; |
| | | } |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | public string QueryPageDeviceGeneralInfo(string param) |
| | | { |
| | | msgss<deviceGeneralInfo> msg = new msgss<deviceGeneralInfo>(); |
| | | msgss<deviceGeneralInfoForDetail> msg = new msgss<deviceGeneralInfoForDetail>(); |
| | | DeviceGeneralInfoInput page = JsonConvert.DeserializeObject<DeviceGeneralInfoInput>(param); |
| | | try |
| | | { |
| | | using (dbModel mod = new dbModel()) |
| | | { |
| | | List<deviceGeneralInfo> fiveDayDeviceInfo = null; |
| | | List<deviceGeneralInfoForDetail> fiveDayDeviceInfo = null; |
| | | if (page.datatime == null) |
| | | { |
| | | fiveDayDeviceInfo = mod.deviceGeneralInfo |
| | | fiveDayDeviceInfo = mod.deviceGeneralInfoForDetail |
| | | .OrderByDescending(x => x.createTime) |
| | | .ToList(); |
| | | } |
| | |
| | | { |
| | | DateTime _startTime = Convert.ToDateTime(page.datatime[0]); |
| | | DateTime _endTime = Convert.ToDateTime(page.datatime[1]); |
| | | fiveDayDeviceInfo = mod.deviceGeneralInfo |
| | | fiveDayDeviceInfo = mod.deviceGeneralInfoForDetail |
| | | .Where(x => x.createTime >= _startTime && x.createTime <= _endTime) |
| | | .OrderByDescending(x => x.createTime) |
| | | .ToList(); |
| | |
| | | } |
| | | } |
| | | |
| | | List<deviceGeneralInfo> fenyeRerult = new List<deviceGeneralInfo>(); |
| | | List<deviceGeneralInfoForDetail> fenyeRerult = new List<deviceGeneralInfoForDetail>(); |
| | | if (fiveDayDeviceInfo.Count > 0) |
| | | { |
| | | msg.status = 200; |
| | |
| | | <Compile Include="orm\C__Base_DriveInfo_WillDel.cs" /> |
| | | <Compile Include="orm\dbModel - å¤å¶.cs" /> |
| | | <Compile Include="orm\dbModel.cs" /> |
| | | <Compile Include="orm\deviceGeneralInfoForDetail.cs" /> |
| | | <Compile Include="orm\deviceGeneralInfo.cs" /> |
| | | <Compile Include="orm\eBay_OrderList_Relation.cs" /> |
| | | <Compile Include="orm\ERP_Interface.cs" /> |