From e8e6b928cfac0be96e747f8730efc37c481169b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= Date: Wed, 4 Jan 2023 16:47:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8D=95=E4=BD=8D=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Config/SwaggerDoc.xml | 6 +++ .../Controllers/ERP/UnitController.cs | 11 +++++ .../yi-sqlsugar-dev.db | Bin 331776 -> 331776 bytes .../Base/Crud/IReadOnlyAppService.cs | 5 +++ .../Crud/AbstractKeyReadOnlyAppService.cs | 7 ++++ Yi.Vue3.x.RuoYi/src/api/erp/unitApi.js | 8 ++++ .../src/views/ERP/material/index.vue | 39 ++++++++++++++---- 7 files changed, 69 insertions(+), 7 deletions(-) diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml index 5321a160..7208b340 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml @@ -261,6 +261,12 @@ + + + 全查 + + + 增 diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/ERP/UnitController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/ERP/UnitController.cs index ae3fccb5..c8180bab 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/ERP/UnitController.cs +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/ERP/UnitController.cs @@ -40,6 +40,17 @@ namespace Yi.Framework.ApiMicroservice.Controllers.ERP return Result.Success().SetData(result); } + /// + /// 全查 + /// + /// + [HttpGet] + public async Task GetList() + { + var result = await _unitService.GetListAsync(); + return Result.Success().SetData(result); + } + /// /// 增 /// diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db index 340aacc04290f79fc82a132291cc9233ce72d8c7..86af01f9b4ee0f88f13ee1218ae6aa78a206a8ad 100644 GIT binary patch delta 472 zcmZozAkwfvWP&tf{zMsP#{9;FtqF`v;+ZXZWhS#X6mJ$3Sj02A{yeK_uuzh4}18NOo6VJ31U=viA z7gy9~aAp7j4l$5P(;ed(ZKfCeW@ghgQ7|;KGBL0+G}bdUFfunbHc7XD>#>LF0a`e{ z@H?|Rx2chpiK(7}v8kEq_Ned7t9EcP^Ur4Bzr(+WfA(fUg-(7|{yPk+^2}^(45H$) zVv#pzy#cz^$k@=>5JmuLqv?D0vv>ft-eTbY!vCEA7EtRMevn5wpgNeRKR?eR&vAx< z{|tW%e+y8)lE2=AK~hp!QY`Y8P$$sP#Nre}(90@{&Mvj;HMfswgf83K|v{7eiDTft_k>__VhfXevaE3ur7OKgSo4 dYj1&Fd!Aoh3g!@Ipe!%UKBnzo-m~y1005XYgfRdB delta 218 zcmZozAkwfvWP&tf@#XXYts~qVR%$`kV7CQY@Dk_%8vqpWwI9 zVPt1xke3&i6pK8bwzo-up}5@0*vPQBxEM$p8yXoK8-ghy3y8QF7#JA&zcBEB*(_-A Mihui;_bfaL06lz3Pyhe` diff --git a/Yi.Framework.Net6/Yi.Framework.Interface/Base/Crud/IReadOnlyAppService.cs b/Yi.Framework.Net6/Yi.Framework.Interface/Base/Crud/IReadOnlyAppService.cs index 3efb6568..b6aa1461 100644 --- a/Yi.Framework.Net6/Yi.Framework.Interface/Base/Crud/IReadOnlyAppService.cs +++ b/Yi.Framework.Net6/Yi.Framework.Interface/Base/Crud/IReadOnlyAppService.cs @@ -21,6 +21,11 @@ namespace Yi.Framework.Interface.Base.Crud /// Task GetByIdAsync(TKey id); + /// + /// 获取全部 + /// + /// + Task> GetListAsync(); /// /// 根据url参数查询 diff --git a/Yi.Framework.Net6/Yi.Framework.Service/Base/Crud/AbstractKeyReadOnlyAppService.cs b/Yi.Framework.Net6/Yi.Framework.Service/Base/Crud/AbstractKeyReadOnlyAppService.cs index c1a06c8d..b97b0cfb 100644 --- a/Yi.Framework.Net6/Yi.Framework.Service/Base/Crud/AbstractKeyReadOnlyAppService.cs +++ b/Yi.Framework.Net6/Yi.Framework.Service/Base/Crud/AbstractKeyReadOnlyAppService.cs @@ -36,6 +36,13 @@ namespace Yi.Framework.Service.Base.Crud protected IRepository Repository { get; set; } + public async Task> GetListAsync() + { + var entitys = await Repository.GetListAsync(); + var entityDtos = await MapToGetListOutputDtosAsync(entitys); + return entityDtos; + } + public async Task GetByIdAsync(TKey id) { var entity = await GetEntityByIdAsync(id); diff --git a/Yi.Vue3.x.RuoYi/src/api/erp/unitApi.js b/Yi.Vue3.x.RuoYi/src/api/erp/unitApi.js index f0d14c0f..ca925c04 100644 --- a/Yi.Vue3.x.RuoYi/src/api/erp/unitApi.js +++ b/Yi.Vue3.x.RuoYi/src/api/erp/unitApi.js @@ -1,5 +1,13 @@ import request from '@/utils/request' +// 全查询 +export function allData() { + return request({ + url: '/unit/getList', + method: 'get' + }) +} + // 分页查询 export function listData(query) { return request({ diff --git a/Yi.Vue3.x.RuoYi/src/views/ERP/material/index.vue b/Yi.Vue3.x.RuoYi/src/views/ERP/material/index.vue index dc2d6c31..78b54705 100644 --- a/Yi.Vue3.x.RuoYi/src/views/ERP/material/index.vue +++ b/Yi.Vue3.x.RuoYi/src/views/ERP/material/index.vue @@ -122,8 +122,12 @@ - - + + + +