apzl_leasing/src_tenwa/com/tenwa/flow/comm/handler/FlowBusinessTreeManagerHandler.java
2018-06-03 22:26:41 +08:00

32 lines
1.0 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.tenwa.flow.comm.handler;
import jbo.sys.CODE_LIBRARY;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
public class FlowBusinessTreeManagerHandler extends CommonHandler{
@Override
protected boolean validityCheck(BizObject bo, boolean isInsert) {
isInsert = true;
try {
String itemNo = bo.getAttribute("ItemNo").toString();
String codeNo = bo.getAttribute("CodeNo").toString();
BizObjectManager bom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME);
BizObject bo1 = bom.createQuery("CodeNo=:CodeNo and ItemNo =:ItemNo").setParameter("CodeNo",codeNo).setParameter("ItemNo",itemNo).getSingleResult(false);
if(bo1 !=null){
this.errors = "树图节点编号重复,请重新选择!";
isInsert = false;//如果存在isInsert设置为false
}
} catch (JBOException e) {
e.printStackTrace();
}//担保人ID
return isInsert;
}
}