Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
傅伟强-富德
/
test
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 94f7c79c
authored
Jan 22, 2019
by
傅伟强-富德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test.txt
1 parent
129ae299
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
225 deletions
test.txt
test.txt
View file @
94f7c79
...
...
@@ -8,33 +8,7 @@
</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
+"&token="+_api.getStorage('userInfo').userId +'_'+_api.getStorage("userInfo").token
<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>
分单结果批量调整满足条件
...
...
@@ -90,217 +64,62 @@ ElasticSearchPolicyServiceImpl类
"UIWL_AN1","UIED_AN1","UIAN_DN1","UIAN_EN1","UBWL_AN1","UBEN_AN1","UBED_CN1"
Integer getNewPolicyCount(Date fromDate, Date endDate);
List<Map<String, String>> getNewPolicyAddress(Date fromDate,Date endDate);
System[gras]
Integer getUpdatePolicyCount(Date fromDate,Date endDate);
List<Map<String, String>> getUpdatePolicyAddress(Date fromDate,Date endDate);
---------------------------------
Integer getNewPolicyCount(@Param("fromDate") Date fromDate, @Param("endDate") Date endDate);
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>
List<Map<String, String>> getNewPolicyAddress(@Param("fromDate") Date fromDate, @Param("endDate") Date endDate);
Integer getUpdatePolicyCount(@Param("fromDate") Date fromDate, @Param("endDate") Date endDate);
List<Map<String, String>> getUpdatePolicyAddress(@Param("fromDate") Date fromDate, @Param("endDate") Date endDate);
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="getNewPolicyCount" resultType="integer">
SELECT count(1)
FROM policy_contact_info pci
WHERE pci.created_date >= #{fromDate,jdbcType=TIMESTAMP} and pci.created_date < #{endDate,jdbcType=TIMESTAMP}
</select>
<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;
<select id="getNewPolicyAddress" resultType="map">
SELECT DISTINCT pci.policy_no AS POLICYNO,ca.FULL_ADDRESS AS FULLADDRESS
FROM policy_contact_info pci
LEFT JOIN CLIENT_ADDRESS ca ON ca.ADDRESS_SEQ = pci.ADDRESS_SEQ
left join gras_policy_geo gpg on gpg.policy_no=pci.policy_no
WHERE
gpg.policy_no is null
and pci.created_date >= #{fromDate,jdbcType=TIMESTAMP} and pci.created_date < #{endDate,jdbcType=TIMESTAMP}
</select>
@Override
public RenewalStaffChangeHistory queryTransferPostByEmpNo(String empNo)
{
return renewalStaffChangeHistoryMapper.queryTransferPostByEmpNo(empNo);
}
}
<select id="getUpdatePolicyCount" resultType="integer">
SELECT count(1)
FROM policy_contact_info pci
WHERE pci.created_date >= #{fromDate,jdbcType=TIMESTAMP} and pci.created_date < #{endDate,jdbcType=TIMESTAMP}
</select>
<select id="getUpdatePolicyAddress" resultType="map">
SELECT DISTINCT pci.policy_no AS POLICYNO,ca.FULL_ADDRESS AS FULLADDRESS
FROM policy_contact_info pci
LEFT JOIN CLIENT_ADDRESS ca ON ca.ADDRESS_SEQ = pci.ADDRESS_SEQ
left join gras_policy_geo gpg on gpg.policy_no=pci.policy_no
WHERE
gpg.policy_no is null
and ca.updated_date >= #{fromDate,jdbcType=TIMESTAMP} and ca.updated_date < #{endDate,jdbcType=TIMESTAMP}
</select>
--------------------------------------------
filter {
json {
source => "message"
remove_field => ["host", "@timestamp", "httpversion", "@version"]
}
date{
match => ["timestamp","yyyy-MM-dd-HH:mm:ss"]
locale => "cn"
}
}
Date startDate = null;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment