lixiaojun
2024-03-25 2fbfc7930364dffbb846d018226755ab66f5bcfb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
namespace Yw.Application
{
    /// <summary>
    /// RepairForm
    /// </summary>
    [Route("Repair/Form")]
    [ApiDescriptionSettings("Repair", Name = "维修工单", Order = 8000)]
    public class RepairForm_Controller : IDynamicApiController
    {
 
        private readonly IHttpContextAccessor _httpContextAccessor;
 
        /// <summary>
        /// 
        /// </summary>
        public RepairForm_Controller(IHttpContextAccessor httpContextAccessor)
        {
            _httpContextAccessor = httpContextAccessor;
        }
 
        /// <summary>
        /// 通过 Kind 获取地图列表
        /// </summary>
        [Route("GetMapListByKind@V1.0")]
        [HttpGet]
        public List<RepairFormKindMapDto> GetMapListByKind([FromQuery][Required] KindInput input)
        {
            var vmList = new List<RepairFormKindMapDto>();
            var requestList = new Service.RepairRequestForm().GetPendingList();
            if (requestList != null && requestList.Count > 0)
            {
                foreach (var request in requestList)
                {
                    var vmRequest = new RepairFormKindMapDto(request, input.Kind);
                    vmList.Add(vmRequest);
                }
            }
            var taskList = new Service.RepairTaskForm().GetUnCheckedList();
            if (taskList != null && taskList.Count > 0)
            {
                foreach (var task in taskList)
                {
                    var vmTask = new RepairFormKindMapDto(task, input.Kind);
                    vmList.Add(vmTask);
                }
            }
            return vmList;
        }
 
 
 
 
 
 
 
 
 
 
    }
}