|
楼主 |
发表于 2021-10-19 22:55:20
|
显示全部楼层
结贴吧,在人员移动Action中自己写了更新任务执行人的逻辑
- public static void moveOrg(String id, Integer version, String newParentID) {
- Org oldOrg = OrgHelper.loadOrg(id, null);
- OrgHelper.moveOrg(id, version, newParentID);
- String oldOrgKindID = oldOrg.getOrgKindID();
- if(OrgNode.PERSONMEMBER.equals(oldOrgKindID)){
- String sPersonID = oldOrg.getPersonID();
- Org newOrg = OrgHelper.loadOrg(sPersonID + "@" + newParentID, null);
- String newFID = newOrg.getFullID();
- String newFName = newOrg.getFullName();
- String ksql = "UPDATE SA_Task a "
- + " SET a.sExecutorFID = :sExecutorFID,"
- + " a.sExecutorFName = :sExecutorFName,"
- + " a.sExecutorOgnID = :sExecutorOgnID,"
- + " a.sExecutorOgnName = :sExecutorOgnName,"
- + " a.sExecutorDeptID = :sExecutorDeptID,"
- + " a.sExecutorDeptName = :sExecutorDeptName,"
- + " a.sExecutorPosID = :sExecutorPosID,"
- + " a.sExecutorPosName = :sExecutorPosName "
- + " WHERE a.sExecutorPersonID = :sExecutorPersonID ";
- HashMap<String, Object> params = new HashMap<String, Object>();
- params.put("sExecutorFID", newFID);
- params.put("sExecutorFName", newFName);
- params.put("sExecutorOgnID", OrgUtils.getOgnIDByFID(newFID));
- params.put("sExecutorOgnName", OrgUtils.getOgnNameByFName(newFID, newFName));
- params.put("sExecutorDeptID", OrgUtils.getDeptIDByFID(newFID));
- params.put("sExecutorDeptName", OrgUtils.getDeptNameByFName(newFID, newFName));
- params.put("sExecutorPosID", OrgUtils.getPosIDByFID(newFID));
- params.put("sExecutorPosName", OrgUtils.getPosNameByFName(newFID, newFName));
- params.put("sExecutorPersonID", sPersonID);
- KSQL.executeUpdate(ksql, params, ProcessUtils.CORE_MODEL, null);
- }
- }
复制代码
|
-
|