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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
package com.panzhihua.serviceapi.api;
 
import java.util.Collections;
 
import javax.annotation.Resource;
 
import org.springframework.web.bind.annotation.*;
 
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.api.EventFile;
import com.panzhihua.common.model.dtos.api.EventInfo;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.serviceapi.biz.LcApiService;
import com.panzhihua.serviceapi.model.dto.LcKeyPersonVisitRecordQueryDTO;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
 
/**
 * program 攀枝花智慧社区项目 description 浪潮事件管理API
 *
 * @author manailin Date 2021-01-22 15:30
 **/
@Slf4j
@Api(tags = {"浪潮事件管理API"})
@RestController
@RequestMapping("/")
public class LcEventApi extends BaseController {
 
    @Resource
    private LcApiService lcApiService;
 
    /**
     * description 向浪潮服务器提交网格事件登记
     *
     * @param eventInfo
     *            事件信息对象
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "向浪潮服务器提交网格事件登记")
    @PostMapping("lc/event/upload")
    public void automationUpload(@RequestBody EventInfo eventInfo) {
        try {
            lcApiService.submitEventRegister(eventInfo);
        } catch (Exception e) {
            log.error("向浪潮服务器提交网格事件登记出现错误:{}", e.getMessage());
        }
    }
 
    /**
     * description 提交事件登记关联的文件或者图片信息
     *
     * @param eventFile
     *            文件对象
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "提交事件登记关联的文件或者图片信息")
    @PostMapping("lc/event/upload/file")
    public R automationUploadFile(@RequestBody EventFile eventFile) {
        return lcApiService.submitEventOrVisitRecordRelationFile(eventFile);
    }
 
    /**
     * description 提交事件登记关联的文件或者图片信息
     *
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "提交事件登记关联的文件或者图片信息")
    @PostMapping("lc/event/upload/event_and_file")
    public void automationUploadEventAndFile() {
        try {
            lcApiService.automationUploadEventAndFile();
        } catch (Exception e) {
            log.error("提交事件登记关联的文件或者图片信息出现错误:{}", e.getMessage());
        }
    }
 
    /**
     * description 获取指定事件信息
     *
     * @param eventId
     *            事件ID
     * @return String 事件信息
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "获取指定事件信息")
    @GetMapping("lc/event/getEventInfoById")
    public String getEventInfoById(String eventId) {
        return lcApiService.getEventInfoById(eventId);
    }
 
    /**
     * description 获取所有或者根据姓名和工号查询,分页
     *
     * @param areaId
     *            西区ID
     * @return String 事件信息
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "获取所有或者根据姓名和工号查询,分页")
    @GetMapping("lc/event/getGridMemberListByAreaIdOrName")
    public R getGridMemberListByAreaIdOrName(String areaId, String param, Long pageNum, Long pageSize) {
        try {
            return R.ok(lcApiService.getGridMemberListByAreaIdOrName(areaId, param, pageNum, pageSize));
        } catch (Exception e) {
            log.error("获取指定区域网格列表出现错误:{}", e.getMessage());
        }
        return R.ok(Collections.emptyList());
    }
 
    /**
     * description 获取指定区域网格列表,树形结构。不包括具体的网格数据。
     *
     * @param areaId
     *            区域ID
     * @return String 事件信息
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "获取指定区域网格树形列表,不包括具体的网格数据")
    @GetMapping("lc/grid/tree")
    public R getGridTreeByAreaId(String areaId) {
        try {
            return R.ok(lcApiService.getGridTreeByAreaId(areaId));
        } catch (Exception e) {
            log.error("获取指定区域网格列表出现错误:{}", e.getMessage());
        }
        return R.ok(Collections.emptyList());
    }
 
    /**
     * description 获取指定区域网格数据列表
     *
     * @param areaId
     *            区域ID
     * @return String 事件信息
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "获取指定区域网格列表")
    @GetMapping("lc/grid/list")
    public R getGridDataListByAreaId(String areaId) {
        try {
            return R.ok(lcApiService.getGridDataListByAreaId(areaId));
        } catch (Exception e) {
            log.error("获取指定区域网格列表出现错误:{}", e.getMessage());
        }
        return R.ok(Collections.emptyList());
    }
 
    /**
     * description 流动人口 走访详情
     *
     * @param recordId
     *            流动人口走访任务ID
     * @return String 事件信息
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "流动人口 走访详情")
    @GetMapping("lc/event/getFlowPersonVisitRecordDetailById")
    public String getFlowPersonVisitRecordDetailById(String recordId) {
        return lcApiService.getFlowPersonVisitRecordDetailById(recordId);
    }
 
    /**
     * description 流动人口 走访记录列表
     *
     * @param lcKeyPersonVisitRecordQueryDTO
     *            入参参数
     * @return String 事件信息
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = " 流动人口 走访记录列表,分页")
    @GetMapping("lc/event/getFlowPersonVisitRecordPage")
    public String
        getFlowPersonVisitRecordPage(@RequestBody LcKeyPersonVisitRecordQueryDTO lcKeyPersonVisitRecordQueryDTO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        return lcApiService.getFlowPersonVisitRecordPage(lcKeyPersonVisitRecordQueryDTO, loginUserInfo.getUserId());
    }
 
    /**
     * description 重点人口 走访详情
     *
     * @param recordId
     *            流动人口走访任务ID
     * @return String 事件信息
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "重点人口 走访详情")
    @GetMapping("lc/event/getKeyPersonVisitRecordDetailById")
    public String getKeyPersonVisitRecordDetailById(String recordId) {
        return lcApiService.getKeyPersonVisitRecordDetailById(recordId);
    }
 
    /**
     * description 重点人口 走访记录列表
     *
     * @param lcKeyPersonVisitRecordQueryDTO
     *            入参参数
     * @return String 事件信息
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = " 重点人口 走访记录列表")
    @GetMapping("lc/event/getKeyPersonVisitRecordPage")
    public String
        getKeyPersonVisitRecordPage(@RequestBody LcKeyPersonVisitRecordQueryDTO lcKeyPersonVisitRecordQueryDTO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        return lcApiService.getKeyPersonVisitRecordPage(lcKeyPersonVisitRecordQueryDTO, loginUserInfo.getUserId());
    }
 
    /**
     * description 自动上传走访记录
     *
     * @author manailin
     * @date 2021/6/10 17:00
     */
    @ApiOperation(value = "自动上传重点人员和流动人员走访记录")
    @GetMapping("lc/auto/upload/visit_record")
    public void automationUploadVisitRecord() {
        try {
            lcApiService.automationUploadVisitRecord();
        } catch (Exception e) {
            log.error("自动上传重点人员走访记录:{}", e.getMessage());
        }
    }
}