代码审批工作流
public String sapPaymentStatus(Context ctx,String resultJson) throws EASBizException, BOSException
{
System.out.print("进入接口.JSON="+resultJson);
//把回传的json字符串转为实体
SapPayMentBean sapPay=com.alibaba.fastjson.JSON.parseObject(resultJson,SapPayMentBean.class);
String result="0";
String seleSQL="select FASSIGNID ,FBILLENTITY ,FBIZOBJID,FBIZFUNCTION,FPERFORMERUNAME_L2 from T_WFR_Assign where FASSIGNID='"+sapPay.getWorkFlowId()+"'";
IRowSet rowSet = com.kingdee.eas.util.app.DbUtil.executeQuery(ctx, seleSQL);
if(rowSet.size()==0)
{
System.out.print(seleSQL+"未查询到相关数据");
return "3";
}
//在缓存中清楚审批信息
EngineUtil.getEngine(ctx).getCacheManager().removeAssignment(sapPay.getWorkFlowId());
//获取审批任务信息时,需要根据来源单据的id判断根据来源单据id找到对应单据的流程任务,获取id进行后续审批操作
//获取审批任务信息
//AssignInfo i=new AssignInfo();
AssignmentInfo assignmentInfo = EnactmentServiceFactory.createEnactService(ctx).getAssignmentById(sapPay.getWorkFlowId());
System.out.print("执行接口.businuessObjectId="+assignmentInfo.getBizObjectIds());
if (assignmentInfo.getState().getValue() > 2)
return result;
//修改上下文中的人员信息为审批任务当前节点的人员
ctx.setCaller(new ObjectUuidPK(assignmentInfo.getAssignInfo().getPersonUserID()));
//定义一个审批结果实体
MultiApproveInfo info = new MultiApproveInfo();
//审批任务
info.setAssignment(sapPay.getWorkFlowId());
//审批单据
info.setBillId(BOSUuid.read(assignmentInfo.getBizObjectIds()));
info.setExtendedProperty("businuessObjectId", assignmentInfo.getBizObjectIds());
info.setExtendedProperty("assignmentID", sapPay.getWorkFlowId());
info.setExtendedProperty("isAddNew", "isAddNew");
info.setIsMailNotifyNext(false);
info.setIsMobelNotifyNext(false);
//审批内容
info.setOpinion( sapPay.getOpinion());
//审批结果
info.setIsPass("submit".equals(sapPay.getActionType()) ? ApproveResult.PASS : ApproveResult.NOT_PASS);
info.setHandlerOpinion(0);
info.setHandlerContent("无");
info.setStatus(MultiApproveStatusEnum.SUBMIT);
info.setBosTypeStr("CAE44FAA");
MultiApproveFactory.getLocalInstance(ctx).save(info);
MultiApproveFactory.getLocalInstance(ctx).submit(info);
System.out.print("执行接口完成,result:"+result);
return result;
}
麻烦分享下这个类SapPayMentBean
代码审批工作流
本文2024-09-16 22:53:04发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-51006.html
- 组织人员同步(星空旗舰-飞书)操作手册V1.0.docx
- 金蝶云·苍穹-数据表模型设计器整体介绍_20241017.pdf
- 金蝶云·苍穹新手入门实战课程配套课件 -5第五章.zip
- 金蝶云·苍穹新手入门实战课程配套课件 -1第一章.zip
- 金蝶云·苍穹-平台引领,Cosmic让智能无处不在.pdf
- KIS云·旗舰版7.0 生产任务管理解决方案(2024.08.01).pptx
- 金蝶云·苍穹新手入门实战课程配套课件 -4第四章.zip
- 金蝶云·苍穹新手入门实战课程配套课件 -7第七章.zip
- 益企成长讲堂-构建透明化生产车间的新篇章.pptx
- 金蝶KIS云旗舰版移动系列整体配置和应用方案介绍(20240815直播).pptx