public void afterAction(ArapBillParamVO param) throws BusinessException { outRelDao.effectRelation(param.getPk_bill_b()); super.afterAction(param); }
public void doCheck(ArapBillParamVO param) throws BusinessException { // TODO Auto-generated method stub if (billnoSet.contains(param.getFbmbillno())) { return; } }
/** * 将收付款单据VO转换为票据处理的参数对象 * * @param param * @return */ public static ArapBillParamVO buildBillParam( SettlementAggVO param, SettlementBodyVO item, int row) throws BusinessException { SettlementHeadVO vo = (SettlementHeadVO) param.getParentVO(); ArapBillParamVO arapParam = new ArapBillParamVO(); String djdl = vo.getDef11(); // 取得前面getClass中放置的单据大类,临时存储 String djlxbm = vo.getPk_tradetype(); // 具体的单据小类 arapParam = new ArapBillParamVO(); if (item.getNotenumber() != null) { arapParam.setFbmbillno(item.getNotenumber().trim()); } arapParam.setPk_curr(item.getPk_currtype()); arapParam.setDjrq(vo.getBusi_billdate()); // 业务单据日期 arapParam.setMemo(item.getMemo()); // 摘要 // 金额合并处理 Map<String, UFDouble> mapMoneyy = null; Map<String, UFDouble> mapMoneyf = null; Map<String, UFDouble> mapMoneyb = null; mapMoneyy = sumMoney((SettlementBodyVO[]) param.getChildrenVO(), djdl, YB); mapMoneyf = sumMoney((SettlementBodyVO[]) param.getChildrenVO(), djdl, FB); mapMoneyb = sumMoney((SettlementBodyVO[]) param.getChildrenVO(), djdl, BB); arapParam.setMoneyy(mapMoneyy.get(arapParam.getFbmbillno())); arapParam.setMoneyf(mapMoneyf.get(arapParam.getFbmbillno())); arapParam.setMoneyb(mapMoneyb.get(arapParam.getFbmbillno())); arapParam.setFrate(item.getFracrate()); // 辅币汇率 arapParam.setBrate(item.getLocalrate()); // 本币汇率 arapParam.setPk_bill_h(vo.getPrimaryKey()); arapParam.setPk_bill_b(item.getPrimaryKey()); arapParam.setOuterbilltype(djlxbm); // 单据类型编码 arapParam.setOuterdjdl(djdl); // 设置单据大类 arapParam.setRow(row + 1); // arapParam.setSkbankacc(item.getSkyhzh());// 收款银行账号 // arapParam.setFkbankacc(item.getFkyhzh());// 付款银行账号 arapParam.setVoperator(vo.getPk_billoperator()); // 录入人 arapParam.setDoperatdate(vo.getBusi_billdate()); // 录入日期,取单据日期 arapParam.setVeffector(vo.getPk_signer()); // 生效人,取确认人(签字人) arapParam.setDeffectdate(vo.getSigndate()); // 生效日期 arapParam.setPk_plansubj(item.getPk_plansubj()); String pk_corp = vo.getPk_corp(); CommonDAO dao = new CommonDAO(); String pk_cust = dao.queryCustByCorp(pk_corp); if (pk_cust == null) { throw new BusinessException( nc.vo.ml.NCLangRes4VoTransl.getNCLangRes() .getStrByID("fbmcomm", "UPPFBMComm-000224") /* @res"公司未对应客商" */); } arapParam.setCurrentunit(pk_cust); // 本方单位,取公司对应客商 arapParam.setTradertype(item.getTradertype()); // 对方类型 if (item.getTradertype() != 0) { throw new BusinessException( nc.vo.ml.NCLangRes4VoTransl.getNCLangRes() .getStrByID("fbmcode112", "UPPFBMCODE112-000037") /*@res "使用票据进行结算往来对象必须是客商"*/); } arapParam.setOtherunit(item.getPk_trader()); // 对方单位,取伙伴编码 arapParam.setPk_corp(pk_corp); // 查询票据基本信息VO if (arapParam.getFbmbillno() != null && arapParam.getFbmbillno().length() > 0) { BaseInfoBO baseBO = new BaseInfoBO(); arapParam.setBaseinfoVO(baseBO.queryByFbmbillno(arapParam.getFbmbillno())); // 查询票据最新动作VO ActionQueryDAO actionDao = new ActionQueryDAO(); arapParam.setNewActionVO(actionDao.queryNewestByFbmBillno(arapParam.getFbmbillno(), pk_corp)); if (arapParam.getPk_busbill() == null) { arapParam.setPk_busbill(arapParam.getNewActionVO().getPk_source()); } // 查询当前单据关联 OuterRelationDAO relDao = new OuterRelationDAO(); arapParam.setOuterVO(relDao.queryBypk_b(item.getPrimaryKey())); } return arapParam; }