test.txt 8.03 KB
 <plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-surefire-plugin</artifactId>
		        <version>2.18.1</version>
		        <configuration>
		          <skipTests>true</skipTests>
		        </configuration>
		      </plugin>
		      
		      currentpolicyaddress
	


分单结果批量调整满足条件
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"
    

 Integer getNewPolicyCount(Date fromDate, Date endDate);

    List<Map<String, String>> getNewPolicyAddress(Date fromDate,Date endDate);

    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);

    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);
    
    

 <select id="getNewPolicyCount" resultType="integer">
        SELECT count(1)
        FROM policy_contact_info pci
        WHERE pci.created_date >= #{fromDate,jdbcType=TIMESTAMP} and pci.created_date &lt; #{endDate,jdbcType=TIMESTAMP}
    </select>
    
    <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 &lt; #{endDate,jdbcType=TIMESTAMP}
    </select>
    
    <select id="getUpdatePolicyCount" resultType="integer">
        SELECT count(1)
        FROM policy_contact_info pci
        WHERE pci.created_date >= #{fromDate,jdbcType=TIMESTAMP} and pci.created_date &lt; #{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 &lt; #{endDate,jdbcType=TIMESTAMP}
    </select>


--------------------------------------------

	
	
	 Date startDate = null;
        Date nowDate = new Date();
        boolean exists = redisUtil.exists(MyConstant.REDIS_GG_CHECKTIME);
        //没有同步记录
        try
        {
            if (!exists)
            {
                SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
                startDate = df.parse("2018-01-01");
                nowDate = df.parse("2018-02-01");
                redisUtil.set(MyConstant.REDIS_GG_CHECKTIME, DateUtil.getDateTimeFormat(nowDate));
                startDate = new Date(startDate.getTime() - 660000L);
            }
            else
            {
                //存在记录
                String lastGGTime = redisUtil.get(MyConstant.REDIS_GG_CHECKTIME).toString();
                System.out.println("lastGGTime:" + lastGGTime);
                startDate = DateUtil.getDateTimeFormat(lastGGTime);
                //本次结束时间为上次结束时间增加一个月
                nowDate=DateUtil.getDateTimeFormat(DateUtil.subMonth(lastGGTime));
                //更新本次同步时间
                redisUtil.set(MyConstant.REDIS_GG_CHECKTIME, DateUtil.getDateTimeFormat(nowDate));
            }

            this.logUtils.info("本次地址解析数据起始时间:" + startDate);
            this.logUtils.info("本次地址解析数据结束时间:" + nowDate);
            try
            {
                List addressMapList = new ArrayList();
                
                //List<Map<String,String>> newPolices = this.oraclePolicyService.selectByDate(startDate);
               /* Map<Integer,List> policyMap=new HashMap<Integer,List>();
              
                
                policyMap= batchesSync(policyMap,newPolices,3000);*/
                
                
                List<Map<String,String>> newPolices=this.oraclePolicyService.getNewPolicyAddress(startDate, nowDate);
                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,nowDate);
            }
            catch (Exception e)
            {
                this.logUtils.error("syncPolicyGeo catch exception ==" + e);
            }
        }
        catch (ParseException e)
        {
            
        }
      
      
      
       select * from (  
      select * from RN_POLICY_SERVICER_CHG_RECORD rnpscr 
      where rnpscr.earlier_agent='H000000000017498'
      and rnpscr.prem_due_date >= to_date('2019-5-1','yyyy-mm-dd')
      and rnpscr.prem_due_date < to_date('2019-6-1','yyyy-mm-dd')
      order by rnpscr.UPDATED_DATE DESC
      )where rownum = 1;