示例#1
0
        public async ValueTask <Srv.Dto.S7.List.GridView.S7Tag> S7TagAsync(CallContext context = default)
        {
            _logger.LogTrace("Query: " + GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name);

            var repository = await _s7TagRepository.GetAllS7TagAsync();

            var tagItems = repository.ToList().Select(
                tag => _mapper.Map <Srv.Dto.S7.S7Tag>(tag)
                ).ToList();

            var commonAnalogDigitalDns = await _queryListKeyValue.AnalogDigitalSignalAsync();

            var commonTagGroupDns = await _queryListKeyValue.TagGroupIdAsync(context);

            var commonInOutDns = await _queryListKeyValue.InputOutputAsync(context);

            var s7ConnectionDns = await _queryS7ListKeyValue.S7ConnectionIdAsync(context);

            var areaDns = await _queryS7ListKeyValue.AreaIdAsync(context);

            var wordLenDns = await _queryS7ListKeyValue.WordLenIdAsync(context);

            var bitOfByteDns = await _queryListKeyValue.BitOfByteAsync(context);

            var output = new Srv.Dto.S7.List.GridView.S7Tag(
                tagItems,
                commonAnalogDigitalDns.List, commonTagGroupDns.List,
                commonInOutDns.List, s7ConnectionDns.List, areaDns.List,
                wordLenDns.List, bitOfByteDns.List);

            return(output);
        }
示例#2
0
        public async ValueTask <IActionResult> Index()
        {
            TagListGridView = await _tagQueryListGridView.LoadAllRecordsAsync();

            return(View(TagListGridView));
        }