test.txt
13.1 KB
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
currentpolicyaddress
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
gabr.due_month
inner join gras_assign_batch_record gabr on gabr.batch_seq=sbp.sequence
<include refid="com.funde.gras.oracle.mapper.CommonMapper.pagePrefix"></include>
<include refid="com.funde.gras.oracle.mapper.CommonMapper.pageSuffix"></include>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.funde.gras.oracle.mapper.CommonMapper">
<!-- 分页 -->
<sql id="pagePrefix">
SELECT * FROM ( select rownum r, union_tb.* from (
</sql>
<sql id="pageSuffix">
) union_tb
) WHERE r > (#{pageNum}-1)*#{pageSize} AND r <![CDATA[ <= ]]> #{pageNum}*#{pageSize}
</sql>
</mapper>
分单结果批量调整满足条件
1.失效件:
(1)保单进入失效月次月至失效日起两年内;
(2)失效原因满足下列其中一项:
保全:未在规定宽限期内缴纳续期保费;
保全:借款本金和利息和超过保单现金价值;
保全:保单的现金价值不足以垫缴保费;
(3)保单渠道与收展服务人员岗位相匹配。
2.缓缴件
(1)保单有效状态的长险(万能险);
(2)保单渠道与收展服务人员岗位相匹配。
自定义查询保单落图:gras/falling/queryPageData----》FallingMapService.queryPageDatas()
获取分区区域列表:gras/branchGeo/getBranchGeoInfoPageByCode----》grasBranchGeoService.selectBranchGeoInfoPageByCode()
获取区域点面数据:gras/branch/getBranchGeoByBranchCode---》branchInfoService.getBranchGeoByBranchCode()
根据机构代码获取渠道:/gras/branchRegion.getBranchRegion--》grasBranchGeoService.getBranchRegion()
根据机构号查询保单:/gras/resultCheck/selectByBranchCode----》ResultCheckService.selectByBranchCode()
根据传入条件查询保单信息:/gras/resultCheck/queryPolicy--》ResultCheckService.queryPolicy()
FallingMapService.outInResult()
FallingMapService.resultput()
ElasticSearchServiceImpl类
ElasticSearchPolicyServiceImpl类
/gras/menu/updateMenus---》menuService.updateByRoleIdAndMenus()
/gras/resultCheck/getDatasExportToExcel----》ResultCheckService.selectForExcel()
批量调整:gras/resultCheck/adjustEmp----》ResultCheckService.adjustEmp
1:目前系统中删除操作涉及的表有:GRAS_BRANCH_GEO、GRAS_BRANCH_STYLE、GRAS_AREA_STAFF、GRAS_SYS_ROLE_MENU、GRAS_SYS_MENU、GRAS_ASSIGN_FAILED_RECORD
"UIWL_AN1","UIED_AN1","UIAN_DN1","UIAN_EN1","UBWL_AN1","UBEN_AN1","UBED_CN1"
System[gras]
void setUser(String userName);
<parameterMap id="stsReturn_param" type="java.lang.String">
<parameter property="userName" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"></parameter>
</parameterMap>
<update id="setUser" parameterMap="stsReturn_param">
call gracde.gra_sys_package.set_user(?)
</update>
RNPolicyServicerChgRecord queryLastTimeServicerChg(Map<String,String> paramMap);
select * from (
select * from RN_POLICY_SERVICER_CHG_RECORD rnpscr
where rnpscr.policy_no in (
select rpsi.policy_no from rn_policy_service_info rpsi,policy_prem_info ppi
where ppi.policy_no=rpsi.policy_no
and rpsi.service_no=#{sreceiveNo}
and ppi.prem_due_date >= "TO_DATE"(#{startMonths},'yyyy-MM-dd hh24:mi:ss')
and ppi.prem_due_date < "TO_DATE"(#{endMonth},'yyyy-MM-dd hh24:mi:ss')
)
and rnpscr.change_mode='0'
order by rnpscr.UPDATED_DATE DESC
)where rownum = 1
//人员转岗校验
Map<String,String> map= transferPost(policyNo,servicerNo);
if(map.get("flag").equals(MyConstant.ISPASS_NO)){
failedList.add(policyNo);
policyFailedMap = new HashMap<>();
policyFailedMap.put("policyNo", policyNo);
policyFailedMap.put("servicerNo", servicerNo);
policyFailedMap.put("cause", map.get("msg"));
policyFailedList.add(policyFailedMap);
failedCount += 1;
continue;
}
//服务人员转岗
private Map<String,String> transferPost(String policyNo,String newEmpNo){
Map<String,String> retMap=new HashMap<String,String>();
RNPolicyServiceInfo rnPolicyServiceInfo = servicerInfoService
.selectByPolicyNo(policyNo);
String oldEmpNo=rnPolicyServiceInfo.getServiceNo();
Date nowDate = new Date();
//获取当前年份
int nowYear = DateUtil.getYear(nowDate);
int nowMonth = DateUtil.getMonth(nowDate);
//1:收展服务人员转岗的情况下,该人员在原岗位时已分配的保单不同意调整,
//应由该服务人员继续服务至过保单考核,此类保单次年再按照规则分配给其他相应收展服务人员
try
{
if(!surrenderEmp(oldEmpNo,policyNo,nowYear)){
retMap.put("flag", MyConstant.ISPASS_NO);
retMap.put("msg", "该保单原收展服务人员转岗后已分配的保单不能调整(过保单考核后次年才可调整)");
return retMap;
}
//收展服务人员转岗当月,可以进行次月应收保单分配
if(!receiveEmp(newEmpNo,policyNo,nowYear,nowMonth)){
retMap.put("flag", MyConstant.ISPASS_NO);
retMap.put("msg", "该服务人员为当月转岗,只能分配应缴日在次月之后的保单");
return retMap;
}
}
catch (Exception e)
{
e.printStackTrace();
retMap.put("flag", MyConstant.ISPASS_NO);
retMap.put("msg", "系统繁忙");
return retMap;
}
retMap.put("flag", MyConstant.ISPASS_YES);
return retMap;
}
/**
* @param newEmpNo
* @param policyNo
* @param nowYear
* @param nowMonth
*/
private boolean receiveEmp(String newEmpNo, String policyNo, int nowYear, int nowMonth)
{
RenewalStaffChangeHistory newEmpChangeHistory=oracleRenewalStaffChangeHistory.queryTransferPostByEmpNo(newEmpNo);
if(newEmpChangeHistory==null){
return true;
}
Date dueMonth=newEmpChangeHistory.getUpdatedDate();
int month = DateUtil.getMonth(dueMonth);
int year = DateUtil.getYear(dueMonth);
//若是当月转岗 可以进行当月之后的应收保单分配
if(year==nowYear && month==nowMonth){
PolicyPremInfo policyPremInfo= premInfoService.selectByPolicyNo(policyNo);
Date premDueDate=DateUtil.getDateFormat(policyPremInfo.getPremDueDate());
int premDueDateMonth = DateUtil.getMonth(premDueDate);
int premDueDateYear = DateUtil.getYear(premDueDate);
if((year==premDueDateYear && premDueDateMonth>month) || premDueDateYear>year){
return true;
}else{
return false;
}
}else{
//如果不是当月,那就是之前转岗的,那也符合条件
return true;
}
}
/**
* @param oldEmpNo
* @param policyNo
* @param nowYear
* @param nowMonth
*/
private boolean surrenderEmp(String oldEmpNo, String policyNo, int nowYear)
{
//取renewal_staff_change_history表, change_type=4,change_status=3的数据
RenewalStaffChangeHistory oldEmpNoChangeHistory=oracleRenewalStaffChangeHistory.queryTransferPostByEmpNo(oldEmpNo);
if(oldEmpNoChangeHistory==null){
return true;
}
Date dueMonth=oldEmpNoChangeHistory.getUpdatedDate();
int year = DateUtil.getYear(dueMonth);
//1:转岗当年(已测) 2:转岗次年后
//原收展服务人员名下的保单,次年才可以交接给其他服务人员
if(nowYear>year){
return true;
}else{
return false;
}
}
<select id="queryTransferPostByEmpNo" parameterType="java.lang.String" resultMap="BaseResultMap">
select * from (
select rsch.emp_no,rsch.post_code,rsch.change_type,rsch.change_status,rsch.updated_date
from renewal_staff_change_history rsch
where rsch.emp_no = #{empNo,jdbcType=VARCHAR}
and rsch.change_status = '3'
and rsch.change_type = '04'
order by rsch.created_date DESC
)where rownum = 1
</select>
<resultMap id="BaseResultMap" type="com.funde.gras.api.domain.RenewalStaffChangeHistory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="CHANGE_APPLY_NO" jdbcType="VARCHAR" property="changeApplyNo" />
<result column="EMP_NO" jdbcType="VARCHAR" property="empNo" />
<result column="EMP_STATUS_CODE" jdbcType="VARCHAR" property="empStatusCode" />
<result column="POST_CODE" jdbcType="VARCHAR" property="postCode" />
<result column="CHANGE_STATUS" jdbcType="TIMESTAMP" property="changeStatus" />
<result column="CHANGE_TYPE" jdbcType="VARCHAR" property="changeType" />
<result column="BANK_FLAG" jdbcType="TIMESTAMP" property="bankFlag" />
<result column="AGENT_FLAG" jdbcType="VARCHAR" property="agentFlag" />
<result column="MARKET_FLAG" jdbcType="VARCHAR" property="marketFlag" />
<result column="UPDATED_DATE" jdbcType="TIMESTAMP" property="updatedDate" />
</resultMap>
@Service(version = "1.0.0", timeout = 1200000,interfaceName = "com.funde.gras.api.service.OracleRenewalStaffChangeHistory")
public class OracleRenewalStaffChangeHistoryImpl implements OracleRenewalStaffChangeHistory
{
@Autowired
private RenewalStaffChangeHistoryMapper renewalStaffChangeHistoryMapper;
@Override
public RenewalStaffChangeHistory queryTransferPostByEmpNo(String empNo)
{
return renewalStaffChangeHistoryMapper.queryTransferPostByEmpNo(empNo);
}
}
filter {
json {
source => "message"
remove_field => ["host", "@timestamp", "httpversion", "@version"]
}
date{
match => ["timestamp","yyyy-MM-dd-HH:mm:ss"]
locale => "cn"
}
}
Date startDate = null;
boolean exists = redisUtil.exists(MyConstant.REDIS_GG_CHECKTIME);
Date nowDate=new Date();
//没有同步记录
if(!exists){
redisUtil.set(MyConstant.REDIS_GG_CHECKTIME, DateUtil.getDateTimeFormat(nowDate));
startDate = new Date(nowDate.getTime() - 660000L);
}else{
//存在记录
String lastGGTime = redisUtil.get(MyConstant.REDIS_GG_CHECKTIME).toString();
System.out.println("lastGGTime:"+lastGGTime);
startDate=DateUtil.getDateTimeFormat(lastGGTime.toString());
//更新本次同步时间
redisUtil.set(MyConstant.REDIS_GG_CHECKTIME, DateUtil.getDateTimeFormat(nowDate));
}
this.logUtils.info("本次地址解析数据起始时间:" + startDate);
// this.logUtils.info("本次地址解析数据结束时间:" + endDate);
try
{
List addressMapList = new ArrayList();
//Integer newPolicyCount = this.oraclePolicyService.countForNewPolicy(startDate);
//if ((newPolicyCount != null) && (newPolicyCount.intValue() != 0))
//{
List newPolices = this.oraclePolicyService.selectByDate(startDate);
if(newPolices!=null && newPolices.size()>0){
this.logUtils.info("增量--本次进行地址解析的总量是:" + newPolices.size());
handlePolicyList(addressMapList, newPolices);
this.logUtils.info("增量--用于解析的地址的量是:" + addressMapList.size());
bulkGeocodingGeo(addressMapList);
addressMapList.clear();
if (this.failedAddressList.size() > 0)
{
this.logUtils.info("增量--解析之前网络原因无法解析的地址信息----" + this.failedAddressList.size() + "条数据");
bulkGeocodingGeo(this.failedAddressList);
this.failedAddressList.clear();
}
this.logUtils.info("增量--本次地址解析结束,共计解析地址:" + newPolices.size());
}else{
this.logUtils.info("增量--本次地址解析结束,共计解析地址:0");
}
//}
//新增的处理完 处理更新的数据
syncUpdatedGeo(startDate);
}
catch (Exception e)
{
this.logUtils.error("syncPolicyGeo catch exception ==" + e);
}