|
@@ -1,29 +1,18 @@
|
|
|
package com.ruoyi.web.controller.dragForm;
|
|
|
|
|
|
-import com.ruoyi.common.annotation.Anonymous;
|
|
|
-import com.ruoyi.common.config.RuoYiConfig;
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
-import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
-import com.ruoyi.common.core.domain.model.LoginUser;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
-import com.ruoyi.common.utils.SecurityUtils;
|
|
|
-import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
|
-import com.ruoyi.common.utils.file.FileUtils;
|
|
|
+import com.ruoyi.common.exception.tenantdatassource.TenantDataSource;
|
|
|
import com.ruoyi.system.entity.CommonEntity;
|
|
|
import com.ruoyi.system.entity.TableSql;
|
|
|
import com.ruoyi.system.service.ICommonService;
|
|
|
import com.ruoyi.system.service.IDragTableService;
|
|
|
import com.ruoyi.system.service.ITableSqlService;
|
|
|
-import dm.jdbc.filter.stat.util.JSONUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/dragform/common")
|
|
@@ -42,7 +31,7 @@ public class CommonController extends BaseController {
|
|
|
* 共通查询
|
|
|
*/
|
|
|
@GetMapping("/selectList")
|
|
|
- public TableDataInfo selectList(CommonEntity commonEntity) throws Exception {
|
|
|
+ public TableDataInfo selectList(CommonEntity commonEntity) {
|
|
|
startPage();
|
|
|
return getDataTable(commonService.selectList(commonEntity));
|
|
|
}
|
|
@@ -51,7 +40,7 @@ public class CommonController extends BaseController {
|
|
|
* 共通批量新增
|
|
|
*/
|
|
|
@PostMapping("/batchInsert")
|
|
|
- public AjaxResult batchInsert(@RequestBody CommonEntity commonEntity) throws Exception {
|
|
|
+ public AjaxResult batchInsert(@RequestBody CommonEntity commonEntity) {
|
|
|
return toAjax(commonService.batchInsert(commonEntity));
|
|
|
}
|
|
|
|
|
@@ -59,7 +48,7 @@ public class CommonController extends BaseController {
|
|
|
* 共通修改sql
|
|
|
*/
|
|
|
@PutMapping("/batchEdit")
|
|
|
- public AjaxResult edit(@RequestBody CommonEntity commonEntity) throws Exception {
|
|
|
+ public AjaxResult edit(@RequestBody CommonEntity commonEntity) {
|
|
|
return toAjax(commonService.edit(commonEntity));
|
|
|
}
|
|
|
|
|
@@ -67,7 +56,7 @@ public class CommonController extends BaseController {
|
|
|
* 批量删除
|
|
|
*/
|
|
|
@DeleteMapping("/batchDelete")
|
|
|
- public AjaxResult batchDelete(@RequestBody CommonEntity commonEntity) throws Exception {
|
|
|
+ public AjaxResult batchDelete(@RequestBody CommonEntity commonEntity) {
|
|
|
return toAjax(commonService.batchDelete(commonEntity));
|
|
|
}
|
|
|
|
|
@@ -78,10 +67,12 @@ public class CommonController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/getTableList")
|
|
|
- public TableDataInfo queryTableList(CommonEntity commonEntity) {
|
|
|
+ public TableDataInfo queryTableList(CommonEntity commonEntity) throws TenantDataSource {
|
|
|
+
|
|
|
TableSql tableSql = iTableSqlService.selectTableSqlByTSqlKey(commonEntity.getQueryMap().get("sqlkey").toString());
|
|
|
startPage(); // 校验是否sqlserver 否执行 是执行另一种方式的分页
|
|
|
return getDataTable(commonService.queryTableList(commonEntity, tableSql));
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -108,7 +99,7 @@ public class CommonController extends BaseController {
|
|
|
* 通用动态表单详情
|
|
|
*/
|
|
|
@GetMapping("/dragTableInfo")
|
|
|
- public AjaxResult dragTableInfo(CommonEntity commonEntity) throws Exception {
|
|
|
+ public AjaxResult dragTableInfo(CommonEntity commonEntity) {
|
|
|
return AjaxResult.success(dragTableService.dragTableInfo(commonEntity.getQueryMap().get("sqlkey").toString()));
|
|
|
}
|
|
|
|
|
@@ -116,7 +107,7 @@ public class CommonController extends BaseController {
|
|
|
* 动态表单预览接口
|
|
|
*/
|
|
|
@GetMapping("/dragTablePreview")
|
|
|
- public TableDataInfo DragTablePreview(CommonEntity commonEntity) throws Exception {
|
|
|
+ public TableDataInfo DragTablePreview(CommonEntity commonEntity) {
|
|
|
startPage();
|
|
|
return getDataTable(commonService.dragTablePreview(commonEntity));
|
|
|
}
|