| | |
| | | |
| | | #region 导入Excel |
| | | [HttpPost] |
| | | public async Task<IActionResult> ImportExcel([FromBody] ApiAction action) |
| | | public async Task<IActionResult> ImportExcel([FromBody] ApiAction<ImportInput> action) |
| | | { |
| | | ApiAction response; |
| | | try |
| | | { |
| | | response = action.GetResponse(await DI.Resolve<IImportExcel>().Import(action.NewDataEntity(),action.Data?.ToString())); |
| | | IImportExcel import = DI.Resolve(action.Data.typeFullName) as IImportExcel; |
| | | response = action.GetResponse(await import.Import(action.NewDataEntity(),action.Data)); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | |
| | | /// <param name="action"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<IActionResult> ValidateTableImport([FromBody] ApiAction<ImportEntityValidate> action) |
| | | public async Task<IActionResult> ValidateTableImport([FromBody] ApiAction<ImportValidateInput> action) |
| | | { |
| | | ApiAction response; |
| | | try |
| | | { |
| | | response = action.GetResponse(await DI.Resolve<IImportExcel>().ValidateTableImport(action.NewDataEntity(), action.Data)); |
| | | IImportExcel import = DI.Resolve(action.Data.typeFullName) as IImportExcel; |
| | | response = action.GetResponse(await import.ValidateTableImport(action.NewDataEntity(), action.Data)); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |