mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
package com.panzhihua.service_dangjian.api;
 
import com.panzhihua.common.model.dtos.partybuilding.ComPbCheckUserDTO;
import com.panzhihua.common.model.vos.TreeListVO;
import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO;
import com.panzhihua.service_dangjian.service.ComPbCheckUnitService;
import com.panzhihua.common.model.dtos.common.*;
import com.panzhihua.common.model.vos.R;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * title: 党建-报到单位(ComPbCheckUnit)  表控制层
 * <p>
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * <p>
 * description: 党建-报到单位
 *
 * @author lyq
 * @date 2022-02-16 16:22:18
 */
@RestController
@RequestMapping("/comPbCheckUnit")
public class ComPbCheckUnitController {
 
    @Resource
    private ComPbCheckUnitService comPbCheckUnitService;
 
    /**
     * description  queryByPage  分页查询
     *
     * @param comPbCheckUnit 请求参数
     * @return 分页查询返回参数
     * @author lyq
     * @date 2022-02-16 16:22:18
     */
    @PostMapping("/page")
    public R queryByPage(@RequestBody PageComPbCheckUnitDto comPbCheckUnit) {
        return this.comPbCheckUnitService.queryByPage(comPbCheckUnit);
    }
 
    @PostMapping("/treeList")
    public R treeList(@RequestBody TreeListVO treeListVO){
        return this.comPbCheckUnitService.treeList(treeListVO);
    }
 
    @GetMapping("/orgList")
    public R orgList(){
        return this.comPbCheckUnitService.orgList();
    }
    /**
     * description  add  新增数据
     *
     * @param comPbCheckUnit 请求参数
     * @return 新增结果
     * @author lyq
     * @date 2022-02-16 16:22:18
     */
    @PostMapping("/add")
    public R add(@RequestBody AddComPbCheckUnitDto comPbCheckUnit) {
        return this.comPbCheckUnitService.insert(comPbCheckUnit);
    }
 
    /**
     * description  edit  编辑数据
     *
     * @param comPbCheckUnit 请求参数
     * @return 编辑结果
     * @author lyq
     * @date 2022-02-16 16:22:18
     */
    @PutMapping("/edit")
    public R edit(@RequestBody EditComPbCheckUnitDto comPbCheckUnit) {
        return this.comPbCheckUnitService.update(comPbCheckUnit);
    }
 
    /**
     * description  deleteById  删除数据
     *
     * @param id 主键id
     * @return 删除结果
     * @author lyq
     * @date 2022-02-16 16:22:18
     */
    @GetMapping("/delete")
    public R deleteById(@RequestParam("id") Long id) {
        return this.comPbCheckUnitService.deleteById(id);
    }
 
    /**
     * description  detailById  查询详情
     *
     * @param id 主键id
     * @return 详情数据
     * @author lyq
     * @date 2022-02-16 16:22:18
     */
    @GetMapping("/detail")
    public R detailById(@RequestParam("id") Long id) {
        return this.comPbCheckUnitService.detailById(id);
    }
    /**
     * description  detailById  查询详情
     *
     * @param phone
     * @return 详情数据
     * @author lyq
     * @date 2022-02-16 16:22:18
     */
    @GetMapping("/detailByPhone")
    public R detailByPhone(@RequestParam("phone") String phone) {
        return this.comPbCheckUnitService.detailByPhone(phone);
    }
 
    /**
     * description  queryByPage  查询列表
     *
     * @param comPbCheckUnit 请求参数
     * @return 列表数据
     * @author lyq
     * @date 2022-02-16 16:22:18
     */
    @PostMapping("/list")
    public R queryByList(@RequestBody PageComPbCheckUnitDto comPbCheckUnit) {
        return this.comPbCheckUnitService.queryByList(comPbCheckUnit);
    }
 
    /**
     * 批量导入报道单位
     * @param list  导入数据
     * @param communityId   社区id
     * @param userId    用户id
     * @return  导入结果
     */
    @PostMapping("/importCheckUnit")
    public R importCheckUnit(@RequestBody List<ComPbCheckUnitExcelVO> list, @RequestParam(value = "communityId") Long communityId
            ,@RequestParam(value = "userId") Long userId){
        return this.comPbCheckUnitService.importCheckUnit(list,communityId,userId);
    }
 
    /**
     * 报到单位统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @return
     */
    @GetMapping("/statistics/top")
    public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId,
                               @RequestParam(value = "belongTo") String belongTo,
                               @RequestParam(value = "belongTo", required = false) String choice,
                               @RequestParam(value = "unitIds", required = false) Long[] unitIds,
                               @RequestParam(value = "yearTime",required = false) String yearTime) {
        return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice,unitIds,yearTime);
    }
 
    /**
     * 报到单位统计
     * @param commonDto
     * @return
     */
    @PostMapping("/statistics")
    public R unitStatistics(@RequestBody PagePbCheckUnitCommonDto commonDto) {
        return comPbCheckUnitService.unitStatistics(commonDto);
    }
 
    /**
     * 报到党员统计-顶部数据
     * @param communityId
     * @param belongTo
     * @param choice
     * @param checkUnitId
     * @return
     */
    @GetMapping("/pbStatistics/top")
    public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId,
                             @RequestParam(value = "belongTo") String belongTo,
                             @RequestParam(value = "choice", required = false) String choice,
                             @RequestParam(value = "checkUnitId", required = false) Long checkUnitId,
                             @RequestParam(value = "unitIds", required = false) Long[] unitIds,
                             @RequestParam(value = "yearTime",required = false) String yearTime) {
        return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId,unitIds,yearTime);
    }
 
    /**
     * 报到党员统计-按单位归属统计
     * @param commonDto
     * @return
     */
    @PostMapping("/pbStatistics/belong")
    public R pbStatisticsBelong(@RequestBody PagePbCheckUnitCommonDto commonDto) {
        return comPbCheckUnitService.pbStatisticsBelong(commonDto);
    }
 
    /**
     * 报到党员统计-按单位统计
     * @param commonDto
     * @return
     */
    @PostMapping("/pbStatistics/unit")
    public R pbStatisticsUnit(@RequestBody PagePbCheckUnitCommonDto commonDto) {
        return comPbCheckUnitService.pbStatisticsUnit(commonDto);
    }
}