@Override protected String doCheck(BusiActionParamVO<T> param) throws BusinessException { ActionVO actionVO = param.getLastActionVO(); if (actionVO == null) { return nc.vo.ml.NCLangRes4VoTransl.getNCLangRes() .getStrByID("fbmcomm", "UPPFBMComm-000238") /* @res"找不到票据动作"*/; } // 2007.11.27 xwq承兑付款日期在票据到期日之后可不校验状态 if (actionVO.getEndstatus().equals(FbmStatusConstant.HAS_DESTROY)) { return nc.vo.ml.NCLangRes4VoTransl.getNCLangRes() .getStrByID("fbmcomm", "UPPFBMComm-000239") /* @res"票据"*/ + param.getBaseinfoVO().getFbmbillno() + nc.vo.ml.NCLangRes4VoTransl.getNCLangRes() .getStrByID("fbmcomm", "UPPFBMComm-000318") /* @res"已核销,无法承兑"*/; } if (actionVO.getEndstatus().equals(FbmStatusConstant.HAS_PAY) || actionVO.getEndstatus().equals(FbmStatusConstant.ON_PAY)) { return nc.vo.ml.NCLangRes4VoTransl.getNCLangRes() .getStrByID("fbmcomm", "UPPFBMComm-000239") /* @res"票据"*/ + param.getBaseinfoVO().getFbmbillno() + nc.vo.ml.NCLangRes4VoTransl.getNCLangRes() .getStrByID("fbmcomm", "UPPFBMComm-000319") /* @res"在付款或已付款,无法承兑"*/; } // 校验业务日期 if (actionVO.getActiondate().after(param.getActiondate())) { return param.getBaseinfoVO().getFbmbillno() + nc.vo.ml.NCLangRes4VoTransl.getNCLangRes() .getStrByID("fbmcomm", "UPPFBMComm-000320") /* @res"的业务日期早于前一操作业务日期"*/; } // 校验付票是否审核 RegisterVO regVO = param.getRegisterVO(); if (regVO != null) { if (regVO.getVbillstatus().intValue() != IBillStatus.CHECKPASS && regVO.getVbillstatus().intValue() != IFBMStatus.Create) { throw new BusinessException( nc.vo.ml.NCLangRes4VoTransl.getNCLangRes() .getStrByID("fbmcomm", "UPPFBMComm-000321") /* @res"付票登记单状态必须为审核通过或已生成单据"*/); } } // 校验是否已生成划账单 // ICreateCorpQueryService ProductService = (ICreateCorpQueryService) // NCLocator.getInstance().lookup(ICreateCorpQueryService.class.getName()); // Hashtable productEnabled = // ProductService.queryProductEnabled(param.getRegisterVO().getPk_corp(),new // String[]{ProductCode.PROD_EP}); // if(((UFBoolean)productEnabled.get(ProductInfo.pro_EP)).booleanValue()){//启用了收付报才校验 // OuterRelationDAO relDao = new OuterRelationDAO(); // if(!relDao.isHjEffect(param.getPk_source())){ // throw new BusinessException("付票登记的划账结算单未生成或未生效"); // } // } return null; }
/** * 组装后台需要的RegisterVO * * @param param * @param oldVO * @return * @throws BusinessException */ private RegisterVO getNewVO(BusiActionParamVO<T> param) throws BusinessException { RegisterVO vo = new RegisterVO(); RegisterVO oldVO = param.getRegisterVO(); ReliefVO reliefVO = param.getSuperVO(); vo.setPk_baseinfo(param.getPk_baseinfo()); vo.setPk_billtypecode(FbmBusConstant.BILLTYPE_GATHER); vo.setGatherdate(param.getActiondate()); vo.setGathertype(FbmBusConstant.GATHER_TYPE_RELIEF); // 调剂来源 vo.setPk_source(param.getPk_bill()); // 来源单据:调剂出库单 vo.setPaybillunit( dao.queryCustByCorp(InvocationInfoProxy.getInstance().getCorpCode())); // 付票单位为当前登陆的公司 vo.setHoldunit(reliefVO.getReliefunit()); // 持票单位 vo.setMoneyy(oldVO.getMoneyy()); vo.setFrate(oldVO.getFrate()); vo.setBrate(oldVO.getBrate()); vo.setMoneyb(oldVO.getMoneyb()); vo.setMoneyf(oldVO.getMoneyf()); vo.setKeepunit( dao.queryCustByCorp(InvocationInfoProxy.getInstance().getCorpCode())); // 持票单位同付票单位,取中心 vo.setIsnewbill(UFBoolean.FALSE); vo.setSfflag(UFBoolean.FALSE); vo.setIsverify(UFBoolean.FALSE); vo.setNote(""); vo.setPk_corp(dao.queryCorpByCust(reliefVO.getReliefunit())); // 根据客商取公司 vo.setVbillno( new HYPubBO().getBillNo(FbmBusConstant.BILLTYPE_GATHER, vo.getPk_corp(), null, null)); /** ************************************************ */ vo.setSfflag(UFBoolean.TRUE); // 收付款标志,默认打上true /** ************************************************ */ vo.setVoperatorid(param.getActionperson()); vo.setDoperatedate(param.getActiondate()); vo.setVapproveid(param.getActionperson()); vo.setDapprovedate(param.getActiondate()); vo.setVapprovenote(""); return vo; }