Ldc
2024-04-07 0652600959e5e3b5796fb6e8da129704ca95347a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package com.vci.web.controller;
 
import com.vci.starter.web.annotation.log.VciBusinessLog;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.web.pageModel.UIContentVO;
import com.vci.web.pageModel.UIFormDefineVO;
import com.vci.web.pageModel.UITableDefineVO;
import com.vci.web.service.UIEngineServiceI;
import com.vci.web.service.impl.WebInitServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 界面控制器
 * @author weidy
 * @date 2021-3-1
 */
@VciBusinessLog(modelName="界面控制器",notStore=true)
@RestController
@RequestMapping("/webUIController")
public class WebUIController {
 
    /**
     * 界面的服务
     */
    @Autowired
    private UIEngineServiceI uiService;
 
    /**
     * 初始化
     */
    @Autowired
    private WebInitServiceImpl initService;
 
    /**
     * 获取UI上下文的定义
     * @param btmType 业务类型
     * @param id 编号
     * @return UI上下文
     */
    @GetMapping("/getUIContentByBtmTypeAndId")
    public UIContentVO getUIContentByBtmTypeAndId(String btmType,String id){
        return uiService.getUIContentByBtmTypeAndId(btmType,id);
    }
 
    /**
     * 使用表单的编号获取定义的对象
     * @param btmType 业务类型
     * @param id 表单的编号
     * @return 表单的定义
     */
    @GetMapping("/getFormDefineById")
    public UIFormDefineVO getFormDefineById(String btmType,String id){
        return uiService.getFormById(btmType,id);
    }
 
    /**
     * 使用表格的编号获取定义的对象
     * @param btmType 业务类型
     * @param id 表单的编号
     * @return 表单的定义
     */
    @GetMapping("/getTableDefineById")
    public UITableDefineVO getTableDefineById(String btmType,String id){
        return uiService.getTableById(btmType,id);
    }
 
    /**
     * 清除缓存
     * @return 执行结果
     */
    @GetMapping("/clearCache")
    public BaseResult clearCache(){
        //服务端那个,一言难尽
        initService.clearAllCache();
        initService.initServerCache();
        return BaseResult.success();
    }
    
 
}