NC65业务插件开发
程序员文章站
2022-03-07 23:40:26
...
@Override
public void doAction(IBusinessEvent arg0) throws BusinessException {
// TODO 自动生成的方法存根
BusinessEvent be = (BusinessEvent) arg0;
AggregatedValueObject[] values = (AggregatedValueObject[]) be.getObject();
AggPayableBillVO[] aggvos = null;
for(int i=0;i<values.length;i++){
aggvos = new AggPayableBillVO[values.length];
aggvos[i] = (AggPayableBillVO) values[i];
}
for(AggPayableBillVO aggvo : aggvos){
PayableBillVO hvo = aggvo.getHeadVO();
UFDouble local_money = hvo.getLocal_money();//组织本币金额
String def70 = hvo.getDef70();//机场合同主键
int approvestatus = hvo.getApprovestatus();//审批状态
UFDate effectdate = hvo.getEffectdate();//生效日期
int effectstatus = hvo.getEffectstatus();//是否生效
String pk_payablebill = hvo.getPk_payablebill();//应付单主键
boolean bol = getIsExistPk_payablebill(def70,pk_payablebill);//是否已经回写到机场合同履行页签
if(approvestatus==1&&effectstatus==10&&!bol){//通过态并且还未回写到机场合同履行页签
updateJchtCvo(local_money,def70,effectdate,pk_payablebill);
}
}
}
private void updateJchtCvo(UFDouble local_money, String def70,
UFDate effectdate, String pk_payablebill) {
BaseDAO dao = new BaseDAO(dataSource);
JchtmanageCVO[] cvos = new JchtmanageCVO[1];
cvos[0] = new JchtmanageCVO();
cvos[0].setAttributeValue(JchtmanageCVO.PK_JCHTMANAGE, def70);
cvos[0].setAttributeValue(JchtmanageCVO.NMONEY, local_money);
cvos[0].setAttributeValue(JchtmanageCVO.DENDDATE, effectdate);
cvos[0].setAttributeValue(JchtmanageCVO.VBDEF1, pk_payablebill);
cvos[0].setAttributeValue("dr", 0);
try {
dao.insertVOArray(cvos);
} catch (DAOException e) {
e.printStackTrace();
}
}
1.节点位置:
上一篇: 用友nc65 uap开发刷新按钮二次开发