| | |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using AutoMapper; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.AspNetCore.Mvc.RazorPages; |
| | | using NetTaste; |
| | | using Newtonsoft.Json; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Diagnostics; |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Reflection; |
| | | using System.Reflection.Metadata; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Comm.Http; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_DTO.Enum; |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | |
| | | |
| | | namespace WIDESEAWCS_TaskInfoService |
| | | { |
| | | public class Task_HtyService : ServiceBase<Dt_Task_hty, ITask_HtyRepository>, ITask_HtyService |
| | | public class Task_HtyService : ServiceBase<Dt_Task_Hty, ITask_HtyRepository>, ITask_HtyService |
| | | { |
| | | private readonly IRouterService _routerService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | |
| | | _mapper = mapper; |
| | | } |
| | | |
| | | |
| | | public static List<string> MaterialCuttingOutletList = new List<string>() { "B102", "B202" , "B402" , "A203" , "A403", "A603", "A803"}; |
| | | public static List<string> EdgeBandingCuttingOutletList = new List<string>() { "F20", "F21"}; |
| | | public static List<string> EdgeSandingCuttingOutletList = new List<string>() { "C13", "F14" }; |
| | | public static List<string> DrillingCuttingPositionList = new List<string>() { "Z13", "Z14" }; |
| | | |
| | | #region ç¬¬åæ¿å |
| | | /// <summary> |
| | | /// 5æ¥å
çåºå
¥åº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent fifteenTotal_quantityndex() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | var startDate = DateTime.Today.AddDays(-5); |
| | | var today = DateTime.Today; |
| | | var dateRange = Enumerable.Range(0, 5).Select(offset => today.AddDays(-offset)); |
| | | |
| | | var data2 = BaseDal.QueryData(x => x.CreateDate >= startDate && x.CreateDate < today.AddDays(1)).ToList(); |
| | | |
| | | var result = dateRange.Reverse().Select(date => |
| | | { |
| | | // ç»è®¡æ¿æä¸æå£ |
| | | //var MaterialCuttingOutlet = data2.Where(x => x.CreateDate >= date && x.CreateDate < date.AddDays(1) && MaterialCuttingOutletList.Contains(x.SourceAddress)).Count(); |
| | | var MaterialCuttingOutlet = 50; |
| | | |
| | | // ç»è®¡å°è¾¹ä¸æå£ |
| | | //var EdgeBandingCuttingOutlet = data2.Where(x => x.CreateDate >= date && x.CreateDate < date.AddDays(1) && EdgeBandingCuttingOutletList.Contains(x.SourceAddress)).Count(); |
| | | var EdgeBandingCuttingOutlet = 40; |
| | | |
| | | // ç»è®¡ç è¾¹ä¸æå£ |
| | | //var EdgeSandingCuttingOutlet = data2.Where(x => x.CreateDate >= date && x.CreateDate < date.AddDays(1) && EdgeSandingCuttingOutletList.Contains(x.SourceAddress)).Count(); |
| | | var EdgeSandingCuttingOutlet = 80; |
| | | |
| | | // ç»è®¡é»åä¸æä½ |
| | | //var DrillingCuttingPosition = data2.Where(x => x.CreateDate >= date && x.CreateDate < date.AddDays(1) && DrillingCuttingPositionList.Contains(x.SourceAddress)).Count(); |
| | | var DrillingCuttingPosition = 30; |
| | | |
| | | return new |
| | | { |
| | | Date = date.ToString("MM-dd"), |
| | | MaterialCuttingOutlets = MaterialCuttingOutlet, |
| | | EdgeBandingCuttingOutlets = EdgeBandingCuttingOutlet, |
| | | EdgeSandingCuttingOutlets = EdgeSandingCuttingOutlet, |
| | | DrillingCuttingPositions = DrillingCuttingPosition, |
| | | }; |
| | | }); |
| | | |
| | | var datat = new |
| | | { |
| | | Daily_statistics = result.ToList(), |
| | | }; |
| | | return content.OK(data: datat); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | } |
| | | } |