Exemple #1
0
                           > GetPaged(GetTP_OrderLogEntitysInput input)
        {
            var query = _tP_OrderLogEntityRepository.GetAll()
                        .WhereIf(!input.FilterText.IsNullOrWhiteSpace(), a => a.c_Id != null


                                 );
            // TODO:根据传入的参数添加过滤条件

            var count = await query.CountAsync();

            var tP_OrderLogEntityList = await query
                                        .OrderBy(input.Sorting).AsNoTracking()
                                        //.PageBy(input)
                                        .ToListAsync();

            var tP_OrderLogEntityListDtos = ObjectMapper.Map <List <TP_OrderLogEntityListDto> >(tP_OrderLogEntityList);

            return(new PagedResultDto <TP_OrderLogEntityListDto>(count, tP_OrderLogEntityListDtos));
        }
Exemple #2
0
        public async Task <ARVOrderLogModel.ARVOrderLogFormReturn> PostAlarmInfoDataAsync([FromBody] ARVOrderLogModel.ARVOrderLogQueryData obj1)
        {
            List <ARVOrderLogModel.ARVOrderLogTableData> resultList = new List <ARVOrderLogModel.ARVOrderLogTableData>();
            Type type = typeof(ARVOrderLogModel.ARVOrderLogTableData);
            GetTP_OrderLogEntitysInput input = new GetTP_OrderLogEntitysInput();
            var arvs = await OrderLogService.GetPaged(input);

            foreach (var i in arvs.Items)
            {
                ARVOrderLogModel.ARVOrderLogTableData obj = (ARVOrderLogModel.ARVOrderLogTableData)type.Assembly.CreateInstance(type.ToString());
                obj.arvid = i.c_CarrierID;
                //obj.arvname = i.c_ARVDesc;
                //obj.c_AGVType = i.c_ARVType.ToString();
                //if (i.c_WorkState >= 1 && i.c_WorkState <= 6) { i.c_WorkState = 1; }
                //obj.arvstatus = i.c_WorkState.ToString();
                //obj.order = i.c_OrderId;
                //obj.actiontype = i.c_TaskType == 1 ? "Pick" : "Put";
                //obj.source = "TT-M4-001 24";//查订单
                //obj.target = "DS001 A";
                //obj.agverror = i.c_ErrorCode;
                //obj.roboterror = i.c_RobotErrorCode;
                //obj.battery = i.c_BatteryVoltage;
                resultList.Add(obj);
            }
            ARVOrderLogModel.ARVOrderLogFormReturn AlarmFormReturn = new ARVOrderLogModel.ARVOrderLogFormReturn();
            AlarmFormReturn.data     = resultList;
            AlarmFormReturn.pageSize = obj1.pageSize;
            AlarmFormReturn.success  = "true";
            AlarmFormReturn.total    = arvs.TotalCount;
            AlarmFormReturn.current  = obj1.current;


            //AlarmTableDataList AlarmTableData = new AlarmTableDataList();
            //AlarmTableData.arvstatus = resultList;
            return(AlarmFormReturn);
        }