| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ BelongType å BelongID è·åå页å表 |
| | | /// </summary> |
| | | [Route("GetPageListByBelongTypeAndBelongID@V1.0")] |
| | | [HttpGet] |
| | | public PageListOutput<RepairRequestFormDto> GetPageListByBelongTypeAndBelongID([FromQuery][Required] QueryRepairRequestFormPageListByBelongInput input) |
| | | { |
| | | int total = 0; |
| | | |
| | | var allEquipmentList = new Yw.Service.Equipment().GetByBelongTypeAndBelongID(input.BelongType, input.BelongID); |
| | | var allEquipmentIds = allEquipmentList?.Select(x => x.ID).Distinct().ToList(); |
| | | |
| | | var list = new Service.RepairRequestForm().GetFluzzyPageListOfEquipmentIds |
| | | (allEquipmentIds, input.CreateUserID, input.FormStatus, input.Urgency, input.FormNo, input.StartTime, input.EndTime, input.PageIndex, input.PageSize, ref total); |
| | | if (list == null || list.Count < 1) |
| | | { |
| | | return new PageListOutput<RepairRequestFormDto>(); ; |
| | | } |
| | | var equipmentList = new Service.Equipment().GetByIds(list.Select(x => x.EquipmentID).Distinct().ToList()); |
| | | var vmList = new List<RepairRequestFormDto>(); |
| | | foreach (var item in list) |
| | | { |
| | | var equipment = equipmentList?.Find(x => x.ID == item.EquipmentID); |
| | | var vm = new RepairRequestFormDto(item, equipment); |
| | | vmList.Add(vm); |
| | | } |
| | | return new PageListOutput<RepairRequestFormDto>() { Total = total, List = vmList }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå¾
åçå页å表 |
| | | /// </summary> |
| | | [Route("GetPendingPageList@V1.0")] |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ BelongType å BelongID è·åå¾
åçå页å表 |
| | | /// </summary> |
| | | [Route("GetPendingPageListByBelongTypeAndBelongID@V1.0")] |
| | | [HttpGet] |
| | | public PageListOutput<RepairRequestFormDto> GetPendingPageListByBelongTypeAndBelongID([FromQuery][Required] QueryRepairRequestFormPendingPageListByBelongInput input) |
| | | { |
| | | int total = 0; |
| | | var allEquipmentList = new Yw.Service.Equipment().GetByBelongTypeAndBelongID(input.BelongType, input.BelongID); |
| | | var allEquipmentIds = allEquipmentList?.Select(x => x.ID).Distinct().ToList(); |
| | | var list = new Service.RepairRequestForm().GetFluzzyPageListOfEquipmentIds |
| | | (allEquipmentIds, input.CreateUserID, eRequestStatus.Pending, input.Urgency, input.FormNo, input.StartTime, input.EndTime, input.PageIndex, input.PageSize, ref total); |
| | | if (list == null || list.Count < 1) |
| | | return new PageListOutput<RepairRequestFormDto>(); |
| | | var equipmentList = new Service.Equipment().GetByIds(list.Select(x => x.EquipmentID).Distinct().ToList()); |
| | | var vmList = new List<RepairRequestFormDto>(); |
| | | foreach (var item in list) |
| | | { |
| | | var equipment = equipmentList?.Find(x => x.ID == item.EquipmentID); |
| | | var vm = new RepairRequestFormDto(item, equipment); |
| | | vmList.Add(vm); |
| | | } |
| | | return new PageListOutput<RepairRequestFormDto>() { Total = total, List = vmList }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | [Route("GetJustAcceptedPageList@V1.0")] |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ BelongType å BelongID è·åå¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | [Route("GetJustAcceptedPageListByBelongTypeAndBelongID@V1.0")] |
| | | [HttpGet] |
| | | public PageListOutput<RepairRequestFormJustAcceptedDto> GetJustAcceptedPageListByBelongTypeAndBelongID([FromQuery][Required] QueryRepairRequestFormJustAcceptedPageListByBelongInput input) |
| | | { |
| | | int total = 0; |
| | | var allEquipmentList = new Yw.Service.Equipment().GetByBelongTypeAndBelongID(input.BelongType, input.BelongID); |
| | | var allEquipmentIds = allEquipmentList?.Select(x => x.ID).Distinct().ToList(); |
| | | var list = new Service.RepairRequestForm().GetJustAcceptedPageListOfEquipmentIds |
| | | (allEquipmentIds, input.CreateUserID, input.Urgency, input.FormNo, input.StartTime, input.EndTime, input.PageIndex, input.PageSize, ref total); |
| | | if (list == null || list.Count < 1) |
| | | { |
| | | return new PageListOutput<RepairRequestFormJustAcceptedDto>(); |
| | | } |
| | | var equipmentList = new Service.Equipment().GetByIds(list.Select(x => x.Item1.EquipmentID).Distinct().ToList()); |
| | | var vmList = new List<RepairRequestFormJustAcceptedDto>(); |
| | | foreach (var item in list) |
| | | { |
| | | var equipment = equipmentList?.Find(x => x.ID == item.Item1.EquipmentID); |
| | | var vm = new RepairRequestFormJustAcceptedDto(item.Item1, item.Item2, equipment); |
| | | vmList.Add(vm); |
| | | } |
| | | return new PageListOutput<RepairRequestFormJustAcceptedDto>() { Total = total, List = vmList }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæçæ¥ä¿®å页å表 |
| | | /// </summary> |
| | | [Route("GetMyPageList@V1.0")] |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ BelongType å BelongID è·åè¿åº¦å页å表 |
| | | /// </summary> |
| | | [Route("GetProgressPageListByBelongTypeAndBelongID@V1.0")] |
| | | [HttpGet] |
| | | public PageListOutput<RepairTaskFormProgressDto> GetProgressPageListByBelongTypeAndBelongID([FromQuery][Required] QueryRepairTaskFormProgressPageListByBelongInput input) |
| | | { |
| | | int total = 0; |
| | | var allEquipmentList = new Yw.Service.Equipment().GetByBelongTypeAndBelongID(input.BelongType, input.BelongID); |
| | | var allEquipmentIds = allEquipmentList?.Select(x => x.ID).Distinct().ToList(); |
| | | var list = _service.GetProgressPageListOfEquipmentIds |
| | | (allEquipmentIds, input.RepairUserID, input.Urgency, input.FormNo, input.StartTime, input.EndTime, input.PageIndex, input.PageSize, ref total); |
| | | if (list == null || list.Count < 1) |
| | | { |
| | | return new PageListOutput<RepairTaskFormProgressDto>() { Total = 0, List = null }; |
| | | } |
| | | var logList = new Service.RepairTaskLog().GetByFormIds(list.Select(x => x.Item1.ID).Distinct().ToList()); |
| | | var equipmentList = new Service.Equipment().GetByIds(list.Select(x => x.Item1.EquipmentID).Distinct().ToList()); |
| | | var vmList = new List<RepairTaskFormProgressDto>(); |
| | | foreach (var item in list) |
| | | { |
| | | var itemLogList = logList?.Where(x => x.FormID == item.Item1.ID).OrderBy(x => x.OperateTime).ToList(); |
| | | var equipment = equipmentList?.Find(x => x.ID == item.Item1.EquipmentID); |
| | | var vm = new RepairTaskFormProgressDto(item.Item1, equipment, item.Item2, itemLogList); |
| | | vmList.Add(vm); |
| | | } |
| | | return new PageListOutput<RepairTaskFormProgressDto>() { Total = total, List = vmList }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå®å·¥å页å表 |
| | | /// </summary> |
| | | [Route("GetFinishedPageList@V1.0")] |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ BelongType å BelongID è·åå®å·¥å页å表 |
| | | /// </summary> |
| | | [Route("GetFinishedPageListByBelongTypeAndBelongID@V1.0")] |
| | | [HttpGet] |
| | | public PageListOutput<RepairTaskFormFinishedDto> GetFinishedPageListByBelongTypeAndBelongID([FromQuery][Required] QueryRepairTaskFormFinishedPageListByBelongInput input) |
| | | { |
| | | int total = 0; |
| | | var allEquipmentList = new Yw.Service.Equipment().GetByBelongTypeAndBelongID(input.BelongType, input.BelongID); |
| | | var allEquipmentIds = allEquipmentList?.Select(x => x.ID).Distinct().ToList(); |
| | | var list = new Service.RepairTaskForm().GetPageListOfEquipmentIds |
| | | (allEquipmentIds, input.RepairUserID, eTaskStatus.Finished, input.Urgency, input.FormNo, input.StartTime, input.EndTime, input.PageIndex, input.PageSize, ref total); |
| | | if (list == null || list.Count < 1) |
| | | { |
| | | return new PageListOutput<RepairTaskFormFinishedDto>() { Total = 0, List = null }; |
| | | } |
| | | var equipmentList = new Service.Equipment().GetByIds(list.Select(x => x.Item1.EquipmentID).Distinct().ToList()); |
| | | var logList = new Service.RepairTaskLog().GetByFormIds(list.Select(x => x.Item1.ID).Distinct().ToList()); |
| | | |
| | | var vmList = new List<RepairTaskFormFinishedDto>(); |
| | | foreach (var item in list) |
| | | { |
| | | var itemLogList = logList?.Where(x => x.FormID == item.Item1.ID).OrderBy(x => x.OperateTime).ToList(); |
| | | var equipment = equipmentList?.Find(x => x.ID == item.Item1.EquipmentID); |
| | | var vm = new RepairTaskFormFinishedDto(item.Item1, equipment, item.Item2, itemLogList); |
| | | vmList.Add(vm); |
| | | } |
| | | return new PageListOutput<RepairTaskFormFinishedDto>() { Total = total, List = vmList }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæç已派åå页å表 |
| | | /// </summary> |
| | | [Route("GetMyAssignedPageList@V1.0")] |
| | |
| | | --> |
| | | <Project> |
| | | <PropertyGroup> |
| | | <History>True|2024-08-22T05:16:45.2219240Z;True|2024-08-20T11:34:36.2347446+08:00;True|2024-06-19T18:35:07.3826637+08:00;True|2024-06-07T16:28:34.9326773+08:00;True|2024-05-31T15:32:36.6255630+08:00;True|2024-05-21T15:18:27.8044420+08:00;True|2024-05-21T15:18:25.6054042+08:00;True|2024-05-13T10:22:02.1380819+08:00;True|2024-05-10T10:36:13.0612236+08:00;True|2024-04-01T10:05:03.8809784+08:00;True|2024-03-25T14:29:53.3457703+08:00;True|2024-01-31T13:24:07.4728291+08:00;True|2024-01-22T11:23:19.7067580+08:00;True|2023-12-25T10:02:24.8948808+08:00;True|2023-12-11T09:27:38.5966472+08:00;True|2023-12-04T18:25:37.5121850+08:00;True|2023-12-04T18:25:32.0321208+08:00;True|2023-07-13T12:10:11.2591498+08:00;True|2023-05-25T18:02:16.3580168+08:00;True|2023-05-25T15:44:32.4909866+08:00;</History> |
| | | <History>True|2024-09-12T08:02:36.0071181Z;True|2024-08-22T13:16:45.2219240+08:00;True|2024-08-20T11:34:36.2347446+08:00;True|2024-06-19T18:35:07.3826637+08:00;True|2024-06-07T16:28:34.9326773+08:00;True|2024-05-31T15:32:36.6255630+08:00;True|2024-05-21T15:18:27.8044420+08:00;True|2024-05-21T15:18:25.6054042+08:00;True|2024-05-13T10:22:02.1380819+08:00;True|2024-05-10T10:36:13.0612236+08:00;True|2024-04-01T10:05:03.8809784+08:00;True|2024-03-25T14:29:53.3457703+08:00;True|2024-01-31T13:24:07.4728291+08:00;True|2024-01-22T11:23:19.7067580+08:00;True|2023-12-25T10:02:24.8948808+08:00;True|2023-12-11T09:27:38.5966472+08:00;True|2023-12-04T18:25:37.5121850+08:00;True|2023-12-04T18:25:32.0321208+08:00;True|2023-07-13T12:10:11.2591498+08:00;True|2023-05-25T18:02:16.3580168+08:00;True|2023-05-25T15:44:32.4909866+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | <RootNamespace>Yw.Application</RootNamespace> |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | <GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
| | | <Version>3.1.0</Version> |
| | | <Version>3.1.1</Version> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Yw.Application.Core" Version="3.1.1" /> |
| | | <PackageReference Include="Yw.Dto.Repair.Core" Version="3.1.0" /> |
| | | <PackageReference Include="Yw.Application.Core" Version="3.1.2" /> |
| | | <PackageReference Include="Yw.Dto.Repair.Core" Version="3.1.2" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.Dto |
| | | { |
| | | /// <summary> |
| | | /// è·åå¾
åçæ¥ä¿®ååæå表 |
| | | /// </summary> |
| | | public class QueryRepairRequestFormPendingPageListByBelongInput : IValidatableObject |
| | | { |
| | | |
| | | /// <summary> |
| | | /// æå±ç±»å |
| | | /// </summary> |
| | | [Required] |
| | | public string BelongType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå±id |
| | | /// </summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage = "BelongID å¿
须大äº0")] |
| | | public long BelongID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建人idï¼æ¥ä¿®äººï¼ |
| | | /// </summary> |
| | | public long? CreateUserID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç´§æ¥ç¨åº¦ |
| | | /// </summary> |
| | | public eUrgency? Urgency { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 表åå· |
| | | /// </summary> |
| | | public string FormNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å§æ¶é´ |
| | | /// </summary> |
| | | [Required] |
| | | public DateTime StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»ææ¶é´ |
| | | /// </summary> |
| | | |
| | | [Required] |
| | | public DateTime EndTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¡µç´¢å¼ |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageIndex å¿
须大äº0")] |
| | | public int PageIndex { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 页尺寸 |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageSize å¿
须大äº0")] |
| | | public int PageSize { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) |
| | | { |
| | | if (StartTime > EndTime) |
| | | { |
| | | yield return new ValidationResult( |
| | | "StartTime å¿
é¡»å°äº EndTime" |
| | | , new[] { nameof(StartTime) } |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.Dto |
| | | { |
| | | /// <summary> |
| | | /// è·åå¾
åçæ¥ä¿®ååæå表 |
| | | /// </summary> |
| | | public class QueryRepairRequestFormJustAcceptedPageListByBelongInput : IValidatableObject |
| | | { |
| | | |
| | | /// <summary> |
| | | /// æå±ç±»å |
| | | /// </summary> |
| | | [Required] |
| | | public string BelongType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå±id |
| | | /// </summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage = "BelongID å¿
须大äº0")] |
| | | public long BelongID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建人idï¼æ¥ä¿®äººï¼ |
| | | /// </summary> |
| | | public long? CreateUserID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç´§æ¥ç¨åº¦ |
| | | /// </summary> |
| | | public eUrgency? Urgency { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 表åå· |
| | | /// </summary> |
| | | public string FormNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å§æ¶é´ |
| | | /// </summary> |
| | | [Required] |
| | | public DateTime StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»ææ¶é´ |
| | | /// </summary> |
| | | |
| | | [Required] |
| | | public DateTime EndTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¡µç´¢å¼ |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageIndex å¿
须大äº0")] |
| | | public int PageIndex { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 页尺寸 |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageSize å¿
须大äº0")] |
| | | public int PageSize { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) |
| | | { |
| | | if (StartTime > EndTime) |
| | | { |
| | | yield return new ValidationResult( |
| | | "StartTime å¿
é¡»å°äº EndTime" |
| | | , new[] { nameof(StartTime) } |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.Dto |
| | | { |
| | | /// <summary> |
| | | /// è·åæ¥ä¿®åå页å表 |
| | | /// </summary> |
| | | public class QueryRepairRequestFormPageListByBelongInput : IValidatableObject |
| | | { |
| | | /// <summary> |
| | | /// æå±ç±»å |
| | | /// </summary> |
| | | [Required] |
| | | public string BelongType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå±id |
| | | /// </summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage = "BelongID å¿
须大äº0")] |
| | | public long BelongID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建人idï¼æ¥ä¿®äººï¼ |
| | | /// </summary> |
| | | public long? CreateUserID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 表åç¶æ |
| | | /// </summary> |
| | | public eRequestStatus? FormStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç´§æ¥ç¨åº¦ |
| | | /// </summary> |
| | | public eUrgency? Urgency { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 表åå· |
| | | /// </summary> |
| | | public string FormNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å§æ¶é´ |
| | | /// </summary> |
| | | [Required] |
| | | public DateTime StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»ææ¶é´ |
| | | /// </summary> |
| | | |
| | | [Required] |
| | | public DateTime EndTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¡µç´¢å¼ |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageIndex å¿
须大äº0")] |
| | | public int PageIndex { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 页尺寸 |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageSize å¿
须大äº0")] |
| | | public int PageSize { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) |
| | | { |
| | | if (StartTime > EndTime) |
| | | { |
| | | yield return new ValidationResult( |
| | | "StartTime å¿
é¡»å°äº EndTime" |
| | | , new[] { nameof(StartTime) } |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.Dto |
| | | { |
| | | /// <summary> |
| | | /// è·åç»´ä¿®åå®å·¥å页å表 |
| | | /// </summary> |
| | | public class QueryRepairTaskFormFinishedPageListByBelongInput : IValidatableObject |
| | | { |
| | | |
| | | /// <summary> |
| | | /// æå±ç±»å |
| | | /// </summary> |
| | | [Required] |
| | | public string BelongType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå±id |
| | | /// </summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage = "BelongID å¿
须大äº0")] |
| | | public long BelongID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 维修人id |
| | | /// </summary> |
| | | public long? RepairUserID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç´§æ¥ç¨åº¦ |
| | | /// </summary> |
| | | public eUrgency? Urgency { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 表åå· |
| | | /// </summary> |
| | | public string FormNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å§æ¶é´ |
| | | /// </summary> |
| | | public DateTime? StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»ææ¶é´ |
| | | /// </summary> |
| | | public DateTime? EndTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¡µç´¢å¼ |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageIndex å¿
须大äº0")] |
| | | public int PageIndex { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 页尺寸 |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageSize å¿
须大äº0")] |
| | | public int PageSize { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) |
| | | { |
| | | if (StartTime.HasValue && EndTime.HasValue) |
| | | { |
| | | if (StartTime > EndTime) |
| | | { |
| | | yield return new ValidationResult( |
| | | "StartTime å¿
é¡»å°äº EndTime" |
| | | , new[] { nameof(StartTime) } |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.Dto |
| | | { |
| | | /// <summary> |
| | | /// è·åç»´ä¿®åè¿åº¦å页å表 |
| | | /// </summary> |
| | | public class QueryRepairTaskFormProgressPageListByBelongInput : IValidatableObject |
| | | { |
| | | /// <summary> |
| | | /// æå±ç±»å |
| | | /// </summary> |
| | | [Required] |
| | | public string BelongType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå±id |
| | | /// </summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage = "BelongID å¿
须大äº0")] |
| | | public long BelongID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 维修人id |
| | | /// </summary> |
| | | public long? RepairUserID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç´§æ¥ç¨åº¦ |
| | | /// </summary> |
| | | public eUrgency? Urgency { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 表åå· |
| | | /// </summary> |
| | | public string FormNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å§æ¶é´ |
| | | /// </summary> |
| | | public DateTime? StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»ææ¶é´ |
| | | /// </summary> |
| | | public DateTime? EndTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¡µç´¢å¼ |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageIndex å¿
须大äº0")] |
| | | public int PageIndex { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 页尺寸 |
| | | /// </summary> |
| | | |
| | | [Required, Range(1, int.MaxValue, ErrorMessage = "PageSize å¿
须大äº0")] |
| | | public int PageSize { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) |
| | | { |
| | | if (StartTime.HasValue && EndTime.HasValue) |
| | | { |
| | | if (StartTime > EndTime) |
| | | { |
| | | yield return new ValidationResult( |
| | | "StartTime å¿
é¡»å°äº EndTime" |
| | | , new[] { nameof(StartTime) } |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | --> |
| | | <Project> |
| | | <PropertyGroup> |
| | | <History>True|2024-08-22T05:14:35.1870058Z;True|2024-08-20T11:33:44.2946883+08:00;True|2024-06-19T18:34:27.0294266+08:00;True|2024-06-07T16:27:48.0487307+08:00;True|2024-05-31T15:32:01.7978407+08:00;True|2024-05-21T15:17:28.8396386+08:00;True|2024-05-13T10:21:28.5463840+08:00;True|2024-05-10T10:35:36.4066500+08:00;True|2024-04-01T10:03:37.9193349+08:00;True|2024-03-25T13:38:09.3123355+08:00;</History> |
| | | <History>True|2024-09-12T08:01:55.3691661Z;True|2024-09-12T15:40:59.8735894+08:00;True|2024-08-22T13:14:35.1870058+08:00;True|2024-08-20T11:33:44.2946883+08:00;True|2024-06-19T18:34:27.0294266+08:00;True|2024-06-07T16:27:48.0487307+08:00;True|2024-05-31T15:32:01.7978407+08:00;True|2024-05-21T15:17:28.8396386+08:00;True|2024-05-13T10:21:28.5463840+08:00;True|2024-05-10T10:35:36.4066500+08:00;True|2024-04-01T10:03:37.9193349+08:00;True|2024-03-25T13:38:09.3123355+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>disable</Nullable> |
| | | <Version>3.1.0</Version> |
| | | <Version>3.1.2</Version> |
| | | <GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Yw.Dto.Assets.Core" Version="3.2.5" /> |
| | | <PackageReference Include="Yw.Service.Repair.Core" Version="3.0.8" /> |
| | | <PackageReference Include="Yw.Dto.Assets.Core" Version="3.2.6" /> |
| | | <PackageReference Include="Yw.Service.Repair.Core" Version="3.0.9" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | { |
| | | get |
| | | { |
| | | //SnowFlakeSingle.WorkId = Settings.SqlSugar.SnowFlakeWorkId; ä¸åæºå¨é
ç½®çå¯ä¸æ°å; // åæå¡å¨ä¸éè¦æå® |
| | | return new ConnectionConfig() |
| | | ConnectionConfig connectConfig = null; |
| | | switch (RepairParasHelper.Repair.DataBase.DbType) |
| | | { |
| | | DbType = SqlSugar.DbType.PostgreSQL,//æ°æ®åºç±»å |
| | | ConnectionString = RepairParasHelper.Repair.DataBase.PostgreSql.ConnectString, |
| | | IsAutoCloseConnection = true,//æ¯å¦èªå¨å
³é |
| | | MoreSettings = new ConnMoreSettings() |
| | | { |
| | | //PgSqlIsAutoToLower = false //æ°æ®åºåå¨å¤§ååæ®µç ï¼éè¦æè¿ä¸ªè®¾ä¸ºfalse ï¼å¹¶ä¸å®ä½ååæ®µåç§°è¦ä¸æ · |
| | | }, |
| | | AopEvents = new AopEvents |
| | | { |
| | | OnLogExecuting = (sql, p) => |
| | | case DbType.PostgreSql: |
| | | { |
| | | // var sqlString = UtilMethods.GetNativeSql(sql, p); |
| | | //LogHelper.Debug(sqlString); |
| | | // Console.WriteLine(sql); |
| | | connectConfig = PostgreSqlConnectionConfig; |
| | | } |
| | | } |
| | | }; |
| | | break; |
| | | case DbType.SQLite: |
| | | { |
| | | connectConfig = SQLiteConnectionConfig; |
| | | } |
| | | break; |
| | | default: break; |
| | | } |
| | | return connectConfig; |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.Repair |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | internal class DbType |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public const string SQLite = "SQLite"; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public const string PostgreSql = "PostgreSql"; |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// æä»¶åç§° |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string FileName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä»¶åç¼ |
| | | /// </summary> |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | public string FileSuffix { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå¨ä»åº |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string StorageHouse { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå¨ç¼ç |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string StorageCode { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// 说æ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Description { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// 表åå· |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string FormNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 表ååç§° |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string FormName { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// é®é¢ç¼ç |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string Faq { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é®é¢æè¿° |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string Question { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// å°å |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string Address { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å®ä½ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Location { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// æä½å
容 |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string OperateContent { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// æä½äººåç§° |
| | | /// </summary> |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | public string OperateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½è¯´æ |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string OperateNote { get; set; } |
| | | |
| | | |
| | |
| | | /// <summary> |
| | | /// 表åå· |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string FormNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 表ååç§° |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string FormName { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// é®é¢ç¼ç |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string Faq { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é®é¢æè¿° |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string Question { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// å°å |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string Address { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å®ä½ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Location { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// ç»´ä¿®ç¨æ·åç§° |
| | | /// </summary> |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | public string RepairUserName { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// æä½å
容 |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string OperateContent { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// æä½äººåç§° |
| | | /// </summary> |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | public string OperateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½è¯´æ |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string OperateNote { get; set; } |
| | | |
| | | |
| | |
| | | /// <summary> |
| | | /// æä»¶åç§° |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string FileName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä»¶åç¼ |
| | | /// </summary> |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | public string FileSuffix { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå¨ä»åº |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string StorageHouse { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå¨ç¼ç |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string StorageCode { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// 说æ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Description { get; set; } |
| | | |
| | | |
| | |
| | | ); |
| | | |
| | | /// <summary> |
| | | /// è·åè®¾å¤æ¨¡ç³å页å表 |
| | | /// </summary> |
| | | List<Entity.RepairRequestForm> GetFluzzyPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | | int? FormStatus, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ); |
| | | |
| | | /// <summary> |
| | | /// è·åå¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | List<Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>> GetJustAccepedPageList |
| | | List<Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>> GetJustAcceptedPageList |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | |
| | | ref int Total |
| | | ); |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | List<Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>> GetJustAcceptedPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ); |
| | | |
| | | |
| | | |
| | |
| | | ); |
| | | |
| | | /// <summary> |
| | | /// è·åè®¾å¤æ¨¡ç³å表 |
| | | /// </summary> |
| | | List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetFluzzyListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? FormStatus, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime |
| | | ); |
| | | |
| | | /// <summary> |
| | | /// è·åå页å表 |
| | | /// </summary> |
| | | List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetPageList |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? FormStatus, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ); |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å页å表 |
| | | /// </summary> |
| | | List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | |
| | | ); |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤è¿è¡ä¸çå页å表 |
| | | /// </summary> |
| | | List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetProgressPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ); |
| | | |
| | | /// <summary> |
| | | /// è·å已宿çå页å表 |
| | | /// </summary> |
| | | List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetHasFinishedPageList |
| | |
| | | ref int Total |
| | | ); |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å·²å®æçå页å表 |
| | | /// </summary> |
| | | List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetHasFinishedPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ); |
| | | |
| | | |
| | | } |
| | |
| | | ) |
| | | { |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm>(); |
| | | exp.And(x => x.CreateUserID == CreateUserID); |
| | | exp.AndIF(FormStatus.HasValue, x => x.FormStatus == FormStatus.Value); |
| | |
| | | ) |
| | | { |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm>(); |
| | | exp.AndIF(EquipmentIds != null && EquipmentIds.Count > 0, x => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(CreateUserID.HasValue, x => x.CreateUserID == CreateUserID); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åè®¾å¤æ¨¡ç³å页å表 |
| | | /// </summary> |
| | | public List<Entity.RepairRequestForm> GetFluzzyPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | | int? FormStatus, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm>(); |
| | | exp.And(x => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(CreateUserID.HasValue, x => x.CreateUserID == CreateUserID); |
| | | exp.AndIF(FormStatus.HasValue, x => x.FormStatus == FormStatus.Value); |
| | | exp.AndIF(Urgency.HasValue, x => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), x => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, x => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, x => x.CreateTime <= EndTime.Value); |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Queryable<Entity.RepairRequestForm>() |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .ToPageList(PageIndex, PageSize, ref Total); ; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>> GetJustAccepedPageList |
| | | public List<Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>> GetJustAcceptedPageList |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | |
| | | ) |
| | | { |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm, Entity.RepairTaskForm>(); |
| | | exp.AndIF(EquipmentIds != null && EquipmentIds.Count > 0, (x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(CreateUserID.HasValue, (x, y) => x.CreateUserID == CreateUserID); |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>> GetJustAcceptedPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm, Entity.RepairTaskForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(CreateUserID.HasValue, (x, y) => x.CreateUserID == CreateUserID); |
| | | exp.And((x, y) => x.FormStatus == (int)eRequestStatus.Accepted); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | exp.And((x, y) => y.FormStatus == (int)eTaskStatus.Accepted); |
| | | |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairRequestForm>() |
| | | .InnerJoin<Entity.RepairTaskForm>((x, y) => y.RequestID != null && x.ID == y.RequestID.Value) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToPageList(PageIndex, PageSize, ref Total); |
| | | return list?.Select(x => new Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åè®¾å¤æ¨¡ç³å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetFluzzyListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? FormStatus, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.AndIF(FormStatus.HasValue, (x, y) => x.FormStatus == FormStatus.Value); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairTaskForm>() |
| | | .LeftJoin<Entity.RepairRequestForm>((x, y) => x.RequestID == y.ID) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToList(); |
| | | return list?.Select(x => new Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetPageList |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? FormStatus, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | PageIndex = 1; |
| | | if (PageSize < 1) |
| | | PageSize = 1; |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.AndIF(FormStatus.HasValue, (x, y) => x.FormStatus == FormStatus.Value); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairTaskForm>() |
| | | .LeftJoin<Entity.RepairRequestForm>((x, y) => x.RequestID == y.ID) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToPageList(PageIndex, PageSize, ref Total); |
| | | return list?.Select(x => new Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åè¿è¡ä¸çå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetProgressPageList |
| | |
| | | PageSize = 1; |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.AndIF(EquipmentIds != null && EquipmentIds.Count > 0, (x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.And((x, y) => x.FormStatus >= (int)eTaskStatus.Received && x.FormStatus < (int)eTaskStatus.Finished); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairTaskForm>() |
| | | .LeftJoin<Entity.RepairRequestForm>((x, y) => x.RequestID == y.ID) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToPageList(PageIndex, PageSize, ref Total); |
| | | return list?.Select(x => new Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤è¿è¡ä¸çå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetProgressPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | PageIndex = 1; |
| | | if (PageSize < 1) |
| | | PageSize = 1; |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.And((x, y) => x.FormStatus >= (int)eTaskStatus.Received && x.FormStatus < (int)eTaskStatus.Finished); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å·²å®æçå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetHasFinishedPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | PageIndex = 1; |
| | | if (PageSize < 1) |
| | | PageSize = 1; |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.And((x, y) => x.FormStatus >= (int)eTaskStatus.Finished); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairTaskForm>() |
| | | .LeftJoin<Entity.RepairRequestForm>((x, y) => x.RequestID == y.ID) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToPageList(PageIndex, PageSize, ref Total); |
| | | return list?.Select(x => new Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | ) |
| | | { |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm>(); |
| | | exp.And(x => x.CreateUserID == CreateUserID); |
| | | exp.AndIF(FormStatus.HasValue, x => x.FormStatus == FormStatus.Value); |
| | |
| | | ) |
| | | { |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm>(); |
| | | exp.AndIF(EquipmentIds != null && EquipmentIds.Count > 0, x => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(CreateUserID.HasValue, x => x.CreateUserID == CreateUserID); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åè®¾å¤æ¨¡ç³å页å表 |
| | | /// </summary> |
| | | public List<Entity.RepairRequestForm> GetFluzzyPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | | int? FormStatus, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm>(); |
| | | exp.And(x => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(CreateUserID.HasValue, x => x.CreateUserID == CreateUserID); |
| | | exp.AndIF(FormStatus.HasValue, x => x.FormStatus == FormStatus.Value); |
| | | exp.AndIF(Urgency.HasValue, x => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), x => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, x => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, x => x.CreateTime <= EndTime.Value); |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Queryable<Entity.RepairRequestForm>() |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .ToPageList(PageIndex, PageSize, ref Total); ; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>> GetJustAccepedPageList |
| | | public List<Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>> GetJustAcceptedPageList |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | |
| | | ) |
| | | { |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm, Entity.RepairTaskForm>(); |
| | | exp.AndIF(EquipmentIds != null && EquipmentIds.Count > 0, (x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(CreateUserID.HasValue, (x, y) => x.CreateUserID == CreateUserID); |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>> GetJustAcceptedPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | { |
| | | PageIndex = 1; |
| | | } |
| | | if (PageSize < 1) |
| | | { |
| | | PageSize = 1; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairRequestForm, Entity.RepairTaskForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(CreateUserID.HasValue, (x, y) => x.CreateUserID == CreateUserID); |
| | | exp.And((x, y) => x.FormStatus == (int)eRequestStatus.Accepted); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | exp.And((x, y) => y.FormStatus == (int)eTaskStatus.Accepted); |
| | | |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairRequestForm>() |
| | | .InnerJoin<Entity.RepairTaskForm>((x, y) => y.RequestID != null && x.ID == y.RequestID.Value) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToPageList(PageIndex, PageSize, ref Total); |
| | | return list?.Select(x => new Tuple<Entity.RepairRequestForm, Entity.RepairTaskForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åè®¾å¤æ¨¡ç³å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetFluzzyListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? FormStatus, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.AndIF(FormStatus.HasValue, (x, y) => x.FormStatus == FormStatus.Value); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairTaskForm>() |
| | | .LeftJoin<Entity.RepairRequestForm>((x, y) => x.RequestID == y.ID) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToList(); |
| | | return list?.Select(x => new Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetPageList |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? FormStatus, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | PageIndex = 1; |
| | | if (PageSize < 1) |
| | | PageSize = 1; |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.AndIF(FormStatus.HasValue, (x, y) => x.FormStatus == FormStatus.Value); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairTaskForm>() |
| | | .LeftJoin<Entity.RepairRequestForm>((x, y) => x.RequestID == y.ID) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToPageList(PageIndex, PageSize, ref Total); |
| | | return list?.Select(x => new Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åè¿è¡ä¸çå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetProgressPageList |
| | |
| | | PageSize = 1; |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.AndIF(EquipmentIds != null && EquipmentIds.Count > 0, (x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.And((x, y) => x.FormStatus >= (int)eTaskStatus.Received && x.FormStatus < (int)eTaskStatus.Finished); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairTaskForm>() |
| | | .LeftJoin<Entity.RepairRequestForm>((x, y) => x.RequestID == y.ID) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToPageList(PageIndex, PageSize, ref Total); |
| | | return list?.Select(x => new Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤è¿è¡ä¸çå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetProgressPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | PageIndex = 1; |
| | | if (PageSize < 1) |
| | | PageSize = 1; |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.And((x, y) => x.FormStatus >= (int)eTaskStatus.Received && x.FormStatus < (int)eTaskStatus.Finished); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å·²å®æçå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>> GetHasFinishedPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | int? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (PageIndex < 1) |
| | | PageIndex = 1; |
| | | if (PageSize < 1) |
| | | PageSize = 1; |
| | | var exp = Expressionable.Create<Entity.RepairTaskForm, Entity.RepairRequestForm>(); |
| | | exp.And((x, y) => EquipmentIds.Contains(x.EquipmentID)); |
| | | exp.AndIF(RepairUserID.HasValue, (x, y) => x.RepairUserID.Value == RepairUserID.Value); |
| | | exp.And((x, y) => x.FormStatus >= (int)eTaskStatus.Finished); |
| | | exp.AndIF(Urgency.HasValue, (x, y) => x.Urgency == Urgency.Value); |
| | | exp.AndIF(!string.IsNullOrEmpty(FormNo), (x, y) => x.FormNo.Contains(FormNo)); |
| | | exp.AndIF(StartTime.HasValue, (x, y) => x.CreateTime >= StartTime.Value); |
| | | exp.AndIF(EndTime.HasValue, (x, y) => x.CreateTime <= EndTime.Value); |
| | | |
| | | |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | var list = db.Queryable<Entity.RepairTaskForm>() |
| | | .LeftJoin<Entity.RepairRequestForm>((x, y) => x.RequestID == y.ID) |
| | | .Where(exp.ToExpression()) |
| | | .OrderBy(x => x.CreateTime, OrderByType.Desc) |
| | | .Select((x, y) => new { x, y }) |
| | | .ToPageList(PageIndex, PageSize, ref Total); |
| | | return list?.Select(x => new Tuple<Entity.RepairTaskForm, Entity.RepairRequestForm>(x.x, x.y)).ToList(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | return _dal.GetPendingCount(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åæç模ç³å页å表 |
| | | /// </summary> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åè®¾å¤æ¨¡ç³å页å表 |
| | | /// </summary> |
| | | public List<Model.RepairRequestForm> GetFluzzyPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | | eRequestStatus? FormStatus, |
| | | eUrgency? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | Total = 0; |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (StartTime > EndTime) |
| | | { |
| | | return default; |
| | | } |
| | | var entity_list = _dal.GetFluzzyPageListOfEquipmentIds(EquipmentIds, CreateUserID, (int?)FormStatus, (int?)Urgency, FormNo, StartTime, EndTime, PageIndex, PageSize, ref Total); |
| | | var model_list = Entity2Models(entity_list); |
| | | return model_list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Model.RepairRequestForm, Model.RepairTaskForm>> GetJustAcceptedPageList |
| | |
| | | Total = 0; |
| | | if (StartTime > EndTime) |
| | | return default; |
| | | var entity_list = _dal.GetJustAccepedPageList(EquipmentIds, CreateUserID, (int?)Urgency, FormNo, StartTime, EndTime, PageIndex, PageSize, ref Total); |
| | | var entity_list = _dal.GetJustAcceptedPageList(EquipmentIds, CreateUserID, (int?)Urgency, FormNo, StartTime, EndTime, PageIndex, PageSize, ref Total); |
| | | var model_list = entity_list?.Select(x => new Tuple<Model.RepairRequestForm, Model.RepairTaskForm>(Entity2Model(x.Item1), Entity2Model(x.Item2))).ToList(); |
| | | return model_list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å¾
æ´¾åå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Model.RepairRequestForm, Model.RepairTaskForm>> GetJustAcceptedPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? CreateUserID, |
| | | eUrgency? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | Total = 0; |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | if (StartTime > EndTime) |
| | | { |
| | | return default; |
| | | } |
| | | var entity_list = _dal.GetJustAcceptedPageListOfEquipmentIds(EquipmentIds, CreateUserID, (int?)Urgency, FormNo, StartTime, EndTime, PageIndex, PageSize, ref Total); |
| | | var model_list = entity_list?.Select(x => new Tuple<Model.RepairRequestForm, Model.RepairTaskForm>(Entity2Model(x.Item1), Entity2Model(x.Item2))).ToList(); |
| | | return model_list; |
| | | } |
| | | |
| | | |
| | | #endregion |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åè®¾å¤æ¨¡ç³å表 |
| | | /// </summary> |
| | | public List<Tuple<Model.RepairTaskForm, Model.RepairRequestForm>> GetFluzzyListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | eTaskStatus? FormStatus, |
| | | eUrgency? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | var entityList = _dal.GetFluzzyListOfEquipmentIds |
| | | (EquipmentIds, RepairUserID, (int?)FormStatus, (int?)Urgency, FormNo, StartTime, EndTime); |
| | | var modelList = entityList?.Select(x => new Tuple<Model.RepairTaskForm, Model.RepairRequestForm>(Entity2Model(x.Item1), Entity2Model(x.Item2))).ToList(); |
| | | return modelList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Model.RepairTaskForm, Model.RepairRequestForm>> GetPageList |
| | |
| | | ) |
| | | { |
| | | var entityList = _dal.GetPageList |
| | | (EquipmentIds, RepairUserID, (int?)FormStatus, (int?)Urgency, FormNo, StartTime, EndTime, PageIndex, PageSize, ref Total); |
| | | var modelList = entityList?.Select(x => new Tuple<Model.RepairTaskForm, Model.RepairRequestForm>(Entity2Model(x.Item1), Entity2Model(x.Item2))).ToList(); |
| | | return modelList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å页å表 |
| | | /// </summary> |
| | | public List<Tuple<Model.RepairTaskForm, Model.RepairRequestForm>> GetPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | eTaskStatus? FormStatus, |
| | | eUrgency? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | var entityList = _dal.GetPageListOfEquipmentIds |
| | | (EquipmentIds, RepairUserID, (int?)FormStatus, (int?)Urgency, FormNo, StartTime, EndTime, PageIndex, PageSize, ref Total); |
| | | var modelList = entityList?.Select(x => new Tuple<Model.RepairTaskForm, Model.RepairRequestForm>(Entity2Model(x.Item1), Entity2Model(x.Item2))).ToList(); |
| | | return modelList; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤è¿è¡ä¸çå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Model.RepairTaskForm, Model.RepairRequestForm>> GetProgressPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | eUrgency? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | var entityList = _dal.GetProgressPageListOfEquipmentIds |
| | | (EquipmentIds, RepairUserID, (int?)Urgency, FormNo, StartTime, EndTime, PageIndex, PageSize, ref Total); |
| | | var modelList = entityList?.Select(x => new Tuple<Model.RepairTaskForm, Model.RepairRequestForm>(Entity2Model(x.Item1), Entity2Model(x.Item2))).ToList(); |
| | | return modelList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å已宿çå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Model.RepairTaskForm, Model.RepairRequestForm>> GetHasFinishedPageList |
| | |
| | | return modelList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å·²å®æçå页å表 |
| | | /// </summary> |
| | | public List<Tuple<Model.RepairTaskForm, Model.RepairRequestForm>> GetHasFinishedPageListOfEquipmentIds |
| | | ( |
| | | List<long> EquipmentIds, |
| | | long? RepairUserID, |
| | | eUrgency? Urgency, |
| | | string FormNo, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize, |
| | | ref int Total |
| | | ) |
| | | { |
| | | if (EquipmentIds == null || EquipmentIds.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | var entityList = _dal.GetHasFinishedPageListOfEquipmentIds |
| | | (EquipmentIds, RepairUserID, (int?)Urgency, FormNo, StartTime, EndTime, PageIndex, PageSize, ref Total); |
| | | var modelList = entityList?.Select(x => new Tuple<Model.RepairTaskForm, Model.RepairRequestForm>(Entity2Model(x.Item1), Entity2Model(x.Item2))).ToList(); |
| | | return modelList; |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | |
| | | --> |
| | | <Project> |
| | | <PropertyGroup> |
| | | <History>True|2024-08-22T05:13:11.0402244Z;True|2024-08-20T11:32:14.3218831+08:00;True|2024-06-19T18:33:48.3413287+08:00;True|2024-06-07T16:25:43.9031253+08:00;True|2024-05-31T15:31:23.8614073+08:00;True|2024-05-10T10:34:57.9511400+08:00;True|2024-04-01T10:02:41.3584446+08:00;True|2024-03-25T12:19:12.1673258+08:00;True|2024-01-22T11:22:37.7738541+08:00;True|2023-12-25T15:19:27.1723882+08:00;True|2023-12-04T18:24:01.9884855+08:00;True|2023-07-13T11:54:33.7989040+08:00;True|2023-07-13T11:54:23.3967174+08:00;True|2023-07-06T09:49:52.7407983+08:00;True|2023-05-25T15:37:23.5406830+08:00;False|2023-05-25T15:36:09.3589239+08:00;</History> |
| | | <History>True|2024-09-12T07:39:58.2927458Z;True|2024-08-22T13:13:11.0402244+08:00;True|2024-08-20T11:32:14.3218831+08:00;True|2024-06-19T18:33:48.3413287+08:00;True|2024-06-07T16:25:43.9031253+08:00;True|2024-05-31T15:31:23.8614073+08:00;True|2024-05-10T10:34:57.9511400+08:00;True|2024-04-01T10:02:41.3584446+08:00;True|2024-03-25T12:19:12.1673258+08:00;True|2024-01-22T11:22:37.7738541+08:00;True|2023-12-25T15:19:27.1723882+08:00;True|2023-12-04T18:24:01.9884855+08:00;True|2023-07-13T11:54:33.7989040+08:00;True|2023-07-13T11:54:23.3967174+08:00;True|2023-07-06T09:49:52.7407983+08:00;True|2023-05-25T15:37:23.5406830+08:00;False|2023-05-25T15:36:09.3589239+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | <RootNamespace>Yw</RootNamespace> |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | <GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
| | | <Version>3.0.8</Version> |
| | | <Version>3.0.9</Version> |
| | | <Description>å¼ç¨å级</Description> |
| | | </PropertyGroup> |
| | | |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Yw.Service.Map.Core" Version="3.1.5" /> |
| | | <PackageReference Include="Yw.Service.Map.Core" Version="3.1.6" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |