广州市综治平台后端
xusd
2 days ago c490640493f04e2ed0fc5c4c8fbc92ebdd4d5380
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
238
239
240
241
242
243
244
245
246
package cn.huge.module.cases.dao.mapper;
 
import cn.huge.module.cases.domain.dto.*;
import cn.huge.module.cases.domain.po.CaseInfo;
import cn.huge.module.cases.domain.po.CaseInfo2;
import cn.huge.module.cases.domain.vo.CaseVo;
import cn.huge.module.cust.dto.CtUnitDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Repository;
 
import java.util.Date;
import java.util.List;
import java.util.Map;
 
/**
 * @version 1.0.0
 * @title: 纠纷信息主表持久层业务处理
 * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
 * @company: hugeinfo
 * @author: wangwh
 * @time: 2024-08-27 10:00:57
 */
@Repository
public interface CaseInfoMapper extends BaseMapper<CaseInfo> {
 
    /**
     * 更新对象
     *
     * @param entity 对象
     */
    void updateCaseInfo(@Param("entity") CaseInfo entity);
 
    /**
     * 批量更新对象
     *
     * @param entity     对象
     * @param caseIdList
     */
    void updateCaseInfoList(@Param("entity") CaseInfo entity, @Param("caseIdList") List<String> caseIdList);
 
    /**
     * 条件更新对象
     *
     * @param entity 对象
     * @param terms  条件
     */
    void updateCaseInfoTerms(@Param("entity") CaseInfo entity, @Param("terms") Map<String, Object> terms);
 
    /**
     * 根据编号物理删除
     *
     * @param id 查询条件集合
     */
    void deleteCaseInfo(@Param("id") String id);
 
    /**
     * 按条件查询结果集
     *
     * @param terms 查询条件集合
     * @return List<CaseInfo>
     */
    List<CaseInfo> listTerms(@Param("terms") Map<String, Object> terms);
 
    /**
     * 按条件查询实体总数
     *
     * @param terms 查询条件集合
     * @return long
     */
    long countTerms(@Param("terms") Map<String, Object> terms);
 
    /**
     * 按条件查询实体分页结果集
     *
     * @param page  分页对象
     * @param terms 查询条件集合
     * @return List<CaseInfo>
     */
    List<CaseInfo> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
 
    List<CaseRegisterDTO> pageTermsCaseRegister(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
 
    long countTermsCaseRegister(@Param("terms") Map<String, Object> terms);
 
    /**
     * 按条件查询实体总数
     *
     * @param terms 查询条件集合
     * @return long
     */
    long countTermsAll(@Param("terms") Map<String, Object> terms);
 
    /**
     * 按条件查询实体分页结果集
     *
     * @param page  分页对象
     * @param terms 查询条件集合
     * @return List<CaseInfo>
     */
    List<CasePageDTO> pageTermsAll(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
 
    /**
     * 导出查询人员信息
     *
     * @param terms 查询条件集合
     * @return List<CasePersonWeDTO>
     */
    List<CasePersonWeDTO> pageTermsPersonAll(@Param("terms") Map<String, Object> terms);
 
    /**
     * 导出查询代理人信息
     *
     * @param terms 查询条件集合
     * @return List<CasePersonWeDTO>
     */
    List<CaseAgentWeDTO> pageTermsAgentAll(@Param("terms") Map<String, Object> terms);
 
    /**
     * 导出查询办理信息
     *
     * @param terms 查询条件集合
     * @return List<CasePersonWeDTO>
     */
    List<CaseHandleWeDTO> pageTermsHandleAll(@Param("terms") Map<String, Object> terms);
 
 
    /**
     * 根据给定的条件统计不同区域的案例数据
     *
     * @param terms 包含统计条件的键值对,如时间范围、地区等
     * @return 返回一个列表,包含按区域统计的案例数据
     */
    List<CaseStatisticsAreaDTO> statisticsArea(@Param("terms") Map<String, Object> terms);
 
    /**
     * 统计基础案例数据,如总案例数、总涉及金额等
     *
     * @param terms 包含统计条件的键值对,如时间范围、地区等
     * @return 返回一个对象,包含基础的案例统计数据
     */
    CaseStatisticsBaseDTO statisticsBase(@Param("terms") Map<String, Object> terms);
 
    /**
     * 统计分析(基础)新版
     * 这通常用于获取基础的案例统计数据,如总数、化解成功数、化解不成功数、化解中数等
     * 新版统计逻辑:
     * - 化解中包括待受理(info_process <= 2)
     * - 化解成功(info_process = 3 且 medi_result = '22_00025-1')
     * - 化解不成功(info_process = 3 且 medi_result = '22_00025-2')
     * - 不予受理(info_process = 4)
     *
     * @param terms 包含统计条件的键值对,如时间范围、地区等
     * @return 返回一个对象,包含基础的案例统计数据
     */
    CaseStatisticsBaseDTO statisticsBaseProcess(@Param("terms") Map<String, Object> terms);
 
 
    /**
     * 统计一级分类下的案例类型数据
     * 这通常用于获取最顶层的案例类型分布
     *
     * @param terms 包含统计条件的键值对,如时间范围、地区等
     * @return 返回一个列表,包含按一级分类统计的案例类型数据
     */
    List<CaseStatisticsTypeDTO> statisticsTypeFirst(@Param("terms") Map<String, Object> terms);
 
    /**
     * 统计所有案例类型的数据,可能包括多个级别的分类
     *
     * @param terms 包含统计条件的键值对,如时间范围、地区等
     * @return 返回一个列表,包含按类型统计的案例数据
     */
    List<CaseStatisticsTypeDTO> statisticsType(@Param("terms") Map<String, Object> terms);
 
    /**
     * 统计案例的数据来源,如不同法院或不同数据录入渠道
     *
     * @param terms 包含统计条件的键值对,如时间范围、地区等
     * @return 返回一个对象,包含案例数据来源的统计信息
     */
    CaseStatisticsSourceDTO statisticsSource(@Param("terms") Map<String, Object> terms);
 
    /**
     * 概览符合条件的所有案例的详细信息
     * 这个方法通常用于生成案例数据的总览或摘要信息
     *
     * @param terms 包含统计条件的键值对,如时间范围、地区等
     * @return 返回一个列表,包含所有符合条件案例的概览信息
     */
    List<CaseOverviewDetailDTO> overviewAcc(@Param("terms") Map<String, Object> terms);
 
    /**
     * 根据查询条件获取案件概览的原始数据
     * 此方法用于处理案件概览页面的原始数据请求,通过接收一组查询条件参数,返回符合查询条件的案件概览详细信息列表
     *
     * @param terms 查询条件的键值对,包含可能影响查询结果的多个条件
     * @return 返回一个列表,包含所有符合查询条件的案件概览详细信息DTO对象
     */
    List<CaseOverviewDetailDTO> overviewSource(@Param("terms") Map<String, Object> terms);
 
    /**
     * 根据查询条件获取案件概览的流程数据
     * 此方法用于处理案件概览页面的流程数据请求,通过接收一组查询条件参数,返回符合查询条件的案件概览详细信息列表
     *
     * @param terms 查询条件的键值对,包含可能影响查询结果的多个条件
     * @return 返回一个列表,包含所有符合查询条件的案件概览详细信息DTO对象
     */
    List<CaseOverviewDetailDTO> overviewFlowCopy(@Param("terms") Map<String, Object> terms);
 
    List<CaseOverviewDetailDTO> overviewResult(@Param("terms") Map<String, Object> terms);
 
    List<CaseOverviewDetailDTO> overviewFlow(@Param("terms") Map<String, Object> terms);
 
    /**
     * 获取指定时间之后的案子,给亿迅同步数据用
     * @param caseVo
     * @return
     */
    List<CaseInfo2> selectByLastTime(@Param("caseVo") CaseVo caseVo);
 
    /**
     * 根据网格编号获取对应级别的综治中心
     * @param terms
     * @return
     */
    CtUnitDTO getUnitByGridCode(@Param("terms") Map<String, Object> terms);
 
    int deleteCaseById(@Param("id") String id,@Param("updateTime") Date updateTime);
    /**
     * 统计指定canal值下按canal_second分组的案件数量
     *
     * @return List<Map<String, Object>> 包含canal_second和count的统计结果
     */
    List<CaseStatisticsTypeDTO> countByCanalSecond(@Param("terms") Map<String, Object> terms);
 
    /**
     * 工作统计按时间分组
     *
     * @param terms 包含统计条件的键值对,如时间范围
     * @return 返回一个对象,包含基础的案例统计数据
     */
    List<CaseWorkStatisticsTimeDTO> workStatisticsTime(@Param("terms") Map<String, Object> terms);
 
}