dangsn
2025-01-02 ce8dfd0bff9ee20e9c2647c771b3a3787f37269e
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package com.vci.web.controller;
 
import java.util.Collection;
import java.util.List;
 
import com.vci.pagemodel.KeyValue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.vci.starter.web.pagemodel.*;
import com.vci.pagemodel.BdSelectInputCharVO;
import com.vci.dto.BdSelectInputCharDTO;
import com.vci.web.service.BdSelectInputCharServiceI;
import com.vci.starter.web.util.*;
 
 
/**
 * 可输可选内容控制器
 *
 * @author weidy
 * @date 2022-03-09
 */
@RestController
@RequestMapping("/bdSelectInputController")
public class BdSelectInputCharController {
    /**
    * 可输可选内容 服务
    */
    @Autowired
    private BdSelectInputCharServiceI bdSelectInputCharService;
 
    /**
     * 可输可选内容列表
     * @param baseQueryObject 基础查询对象,包含查询条件,分页,排序等
     * @return 可输可选内容显示对象列表
     */
    @GetMapping("/gridBdSelectInputChar")
    public DataGrid<BdSelectInputCharVO> gridBdSelectInputChar(BaseQueryObject baseQueryObject){
        if(baseQueryObject == null){
            baseQueryObject = new BaseQueryObject();
        }
        return bdSelectInputCharService.gridBdSelectInputChar(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper());
    }
    /**
     * 增加 可输可选内容
     * @param bdSelectInputCharDTO 可输可选内容数据传输对象
     * @return 执行结果,success为true表示成功,msg是失败的提示信息,obj是添加完成后的显示对象
     */
    @PostMapping( "/addSave")
    public BaseResult<BdSelectInputCharVO> addSave(@RequestBody BdSelectInputCharDTO bdSelectInputCharDTO){
         BdSelectInputCharVO bdSelectInputCharVO = bdSelectInputCharService.addSave(bdSelectInputCharDTO);
         return BaseResult.success(bdSelectInputCharVO);
    }
 
    /**
     * 修改 可输可选内容
     * @param bdSelectInputCharDTO 可输可选内容数据传输对象
     * @return 执行结果,success为true表示成功,msg是失败的提示信息,obj是添加完成后的显示对象
     */
    @PutMapping("/editSave")
    public BaseResult<BdSelectInputCharVO> editSave(@RequestBody BdSelectInputCharDTO bdSelectInputCharDTO){
        BdSelectInputCharVO bdSelectInputCharVO = bdSelectInputCharService.editSave(bdSelectInputCharDTO);
        return BaseResult.success(bdSelectInputCharVO);
    }
 
 
    /**
     * 删除可输可选内容
     * @param bdSelectInputCharDTO 可输可选内容数据传输对象,oid和ts需要传输
     * @return 删除结果反馈::success:成功,fail:失败
     */
    @DeleteMapping( "/deleteData")
    public BaseResult delBdSelectInputChar( BdSelectInputCharDTO bdSelectInputCharDTO) {
        return bdSelectInputCharService.deleteBdSelectInputChar(bdSelectInputCharDTO);
    }
 
    /**
    * 主键获取可输可选内容
    * @param oid 主键
    * @return 可输可选内容显示对象
    */
    @GetMapping("/getObjectByOid")
    public BaseResult<BdSelectInputCharVO> getObjectByOid(String oid){
        BdSelectInputCharVO bdSelectInputCharVO = bdSelectInputCharService.getObjectByOid(oid);
        return BaseResult.success(bdSelectInputCharVO);
    }
 
    /**
     * 主键批量获取可输可选内容
     * @param oids 主键,多个以逗号分隔,但是受性能影响,建议一次查询不超过10000个
     * @return 可输可选内容显示对象
     */
    @GetMapping("/listDataByOids")
    public BaseResult<BdSelectInputCharVO> listBdSelectInputCharByOids(String oids){
        Collection<BdSelectInputCharVO> voCollection =  bdSelectInputCharService.listBdSelectInputCharByOids(VciBaseUtil.str2List(oids));
        BaseResult baseResult = BaseResult.success();
        baseResult.setData(voCollection);
        return  baseResult;
    }
 
 
 
    /**
     * 参照可输可选内容列表
     * @param baseQueryObject 基础查询对象,包含查询条件,分页,排序等
     * @return 可输可选内容显示对象列表,生效的内容
     */
    @GetMapping("/refDataGrid")
    public DataGrid<BdSelectInputCharVO> refDataGridBdSelectInputChar(BaseQueryObject baseQueryObject){
        if(baseQueryObject == null){
            baseQueryObject = new BaseQueryObject();
        }
        return bdSelectInputCharService.refDataGridBdSelectInputChar(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper());
    }
 
    /**
     * 获取可选择的列表
     * @param flag 标记
     * @param namespace 命名空间
     * @return 包含的内容
     */
    @GetMapping("/listByFlag")
    public BaseResult<List<KeyValue>> listByFlag(String namespace,String flag){
        return BaseResult.success(bdSelectInputCharService.listByFlag(namespace,flag));
    }
}