需要注册业务插件在 ncc 开发配置 -业务插件注册里面注册该类的限定名 具体参照其注册 注册需要注意所属模块否则不生效
package nccloud.itf.sscivm.ivsale.impl;
import java.util.List;
import java.util.Map;
import nc.bs.businessevent.BusinessEvent;
import nc.bs.businessevent.IBusinessEvent;
import nc.bs.businessevent.IBusinessListener;
import nc.bs.dao.BaseDAO;
import nc.jdbc.framework.processor.ColumnListProcessor;
import nc.vo.arap.receivable.AggReceivableBillVO;
import nc.vo.arap.receivable.ReceivableBillVO;
import nc.vo.pub.BusinessException;
import nc.vo.sscivm.ivsale.IVApplicationHeadVO;
public class Openthecheckplug_in implements IBusinessListener{
private BaseDAO baseDao;
private BaseDAO getDao() {
if (baseDao == null) {
baseDao = new BaseDAO();
}
return baseDao;
// private IDefdocQueryService defdocQueryService;
// private IDefdocQueryService getDefdocService() {
// if(defdocQueryService == null) {
// defdocQueryService = NCLocator.getInstance().lookup(IDefdocQueryService.class);
// }
// return defdocQueryService;
// } }
@Override
public void doAction(IBusinessEvent arg0) throws BusinessException {
// TODO Auto-generated method stub
if(arg0 instanceof BusinessEvent) {
BusinessEvent headvo = (BusinessEvent)arg0;
Object[] vos = (Object[]) headvo.getObject();
for (int i = 0; i < vos.length; i++) {
if(vos[i] instanceof IVApplicationHeadVO) {
AggReceivableBillVO vooo= (AggReceivableBillVO) vos[i];
ReceivableBillVO vo = vooo.getHeadVO();
String def19 = vo.getDef19();
if(def19!=null&&"Y".equals(def19)) {
throw new BusinessException("!");
}
}
}
}
}
}