package com.tenwa.flow.fund.flowpayment; import java.util.HashMap; import java.util.List; import java.util.Map; import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.awe.util.Transaction; import com.amarsoft.dict.als.cache.CodeCache; import com.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.template.check.DefaultBussinessCheck; /** * 检查付款申请支付对象和对方银行 * */ public class OwnBankCheck extends DefaultBussinessCheck { @Override public Object run(Transaction Sqlca) throws Exception { String flowunid=this.getAttribute("ObjectNo").toString(); List bos = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME).createQuery("flowunid=:flowunid and settle_method<>'settlemethod11'") .setParameter("flowunid", flowunid).getResultList(false); if(bos.size() > 0){ String message = "请填写"; boolean flag = true; for(BizObject bo:bos){ String clientBank = bo.getAttribute("bank").getString(); if("settlemethod11".equals(bo.getAttribute("settle_method").getString())){ if("".equals(clientBank)){ message += "投放编号为【"+bo.getAttribute("payment_number").getString()+"】编号为【"+bo.getAttribute("plan_list").getString()+"】的【"+CodeCache.getItemName("SettleMethod", bo.getAttribute("settle_method").getString())+"】的本方银行信息!"; flag = false; } }else{ if("".equals(clientBank)){ message += "投放编号为【"+bo.getAttribute("payment_number").getString()+"】编号为【"+bo.getAttribute("plan_list").getString()+"】的【"+CodeCache.getItemName("FeeType", bo.getAttribute("fee_type").getString())+"】的本方银行信息!"; flag = false; } } } if(flag){ putMsg("信息填写正常!"); setPass(true); }else{ putMsg(message); setPass(false); } }else{ putMsg("未生成本次付款!"); setPass(false); } return null; } }