/** * @author hanluoxing * @changelog 2011-11-14 下午04:17:54 hanluoxing 修改部分:->组装入参数据 * @param plyvo 基本信息 * @param taskvo 任务信息 * @param planlist 分期信息 * @return */ private OutContAccVo initOutContAccVo( PLY_INFO plyvo, TASK_INFO taskvo, List<PlyPayPlanInfoVo> planlist) { OutContAccVo vo = null; if (!Utils.isEmpty(plyvo) && !Utils.isEmpty(taskvo) && !Utils.isEmpty(planlist)) { vo = new OutContAccVo(); vo.setSERVICE_TYPE("3"); vo.setTRANSACTION_TYPE("1"); vo.setPlyInfo(plyvo); vo.setTaskInfo(taskvo); vo.setPlypayplaninfolist(planlist); } return vo; }
/** * @author hanluoxing * @param vo * @changelog 2011-11-14 下午05:19:36 hanluoxing 修改部分:->保存出参 * @param msg */ public void insertOutMsg(OutContAccVo ovo, String msg) { if (!Utils.isEmpty(ovo)) { PLY_INFO vo = ovo.getPlyInfo(); String plyappno = vo.getPROPOSALNO(); String plyno = vo.getPOLICYNO(); String edrappno = vo.getEDRAPPNO(); String edrno = vo.getENDORSENO(); long taskid = 0; try { taskid = dao.queryForTaskId(plyappno, plyno, edrappno, edrno); } catch (Exception e) { e.printStackTrace(); log.info( "根据投保单号:" + plyappno + ",保单号:" + plyno + ",批单申请单号:" + edrappno + ",批单号:" + edrno + ",查询离线任务ID出错,错误信息为: " + e.getMessage()); } if (taskid != 0) { dao.insertOutMsg(ovo, msg, taskid); } // boolean isExist = isExistOutMsg(plyno, edrno, taskid); // if (isExist) { // delExistOutMsg(plyno, edrno, taskid); // } } }
/** * @author hanluoxing * @param vo * @return 判断当前保批单是否有未计算的记录 */ public boolean hasEdrNotCal(OutContAccVo vo) { boolean flag = false; if (!Utils.isEmpty(vo)) { PLY_INFO plyvo = vo.getPlyInfo(); TASK_INFO taskvo = vo.getTaskInfo(); String plyno = plyvo.getPOLICYNO(); String edrappno = plyvo.getEDRAPPNO(); String edrno = plyvo.getENDORSENO(); String serino = plyvo.getPROPOSALSERIALNO(); Timestamp starttm = taskvo.getTASKSTARTDATE(); String starttmstr = starttm.toString(); if (!Utils.isEmpty(edrappno) || !Utils.isEmpty(edrno)) { int count = 0; count = dao.queryForEdrCont(plyno, edrno, starttmstr, serino); if (count > 0) flag = true; else flag = false; } else flag = false; } return flag; }
/** * @author hanluoxing * @changelog 2011-11-14 下午02:10:56 hanluoxing 修改部分:->根据离线任务信息组装成入参vo * @param cvo * @return */ public OutContAccVo buildOutContAccVo(CalUndrTaskVo cvo) { OutContAccVo vo = null; if (!Utils.isEmpty(cvo)) { // 构造基本信息 String plyappno = cvo.getC_ply_app_no(); String plyno = cvo.getC_ply_no(); String edrappno = cvo.getC_edr_app_no(); String edrno = cvo.getC_edr_no(); PLY_INFO plyvo = buildPlyInfoVo(plyappno, plyno, edrappno, edrno); TASK_INFO taskvo = buildTaskInfo(cvo); List<PlyPayPlanInfoVo> planlist = buildPayPlanListVo(plyappno, plyno, edrappno, edrno); vo = initOutContAccVo(plyvo, taskvo, planlist); } return vo; }
/** * @author hanluoxing * @changelog hanluoxing 2011-12-2 下午01:55:11 ->构造离线任务信息 * @param cvo * @return */ private TASK_INFO buildTaskInfo(CalUndrTaskVo cvo) { TASK_INFO vo = null; if (!Utils.isEmpty(cvo)) { vo = new TASK_INFO(); vo.setAPPLYNO(cvo.getC_edr_app_no()); vo.setCHANGEDATETIME(cvo.getT_upd_tm()); vo.setCHANGEUSERCODE(cvo.getC_crt_cde()); vo.setCREATEDATETIME(cvo.getT_crt_tm()); vo.setCREATEUSERCODE(cvo.getC_crt_cde()); vo.setDEPTCODE(cvo.getC_dpt_cde()); vo.setENDORSENO(cvo.getC_edr_no()); vo.setId(cvo.getId()); vo.setIFISSUED("0"); // 核保标记 vo.setINSURANCEVALUE(cvo.getN_ri_amt()); vo.setPOLICYNO(cvo.getC_ply_no()); vo.setPREMIUM(cvo.getN_ri_prm()); vo.setPROPOSALNO(cvo.getC_ply_app_no()); vo.setTASKSTARTDATE(cvo.getT_task_start_tm()); } return vo; }