package com.vci.client.uif.actions.client;
|
|
import java.util.Map;
|
import java.util.Map.Entry;
|
|
import com.vci.client.LogonApplication;
|
import com.vci.client.common.objects.UserEntityObject;
|
import com.vci.client.uif.engine.common.IDataNode;
|
import com.vci.client.workflow.delegate.ProcessCustomClientDelegate;
|
import com.vci.client.workflow.task.TaskAssignedForPlatformDialog;
|
import com.vci.mw.ClientContextVariable;
|
|
/**
|
* Action
|
* <p>单个任务转移</p>
|
* @author liudi
|
*
|
*/
|
public class SetTaskAssignWorkFlowAction extends AbstractBusionessOperationAction {
|
|
@Override
|
public String getKey() {
|
return "settaskassign";
|
}
|
|
@Override
|
public boolean checkHasRight() {
|
return true;
|
}
|
|
/* (non-Javadoc)
|
* @see plm.uif.actions.client.BusinessOperationAction#doPost()
|
*/
|
@Override
|
public boolean doPost() {
|
// 获取选择的数据
|
// 数据的实际类型一般为 IDataNode
|
Object[] objs = getDataModel().getSelectObjects();
|
// paramsMap = getButtonParams();
|
|
UserEntityObject userEntityObject = new UserEntityObject();
|
String ip = ClientContextVariable.getInvocationInfo().clientIPInfo;
|
String loginUserName = ClientContextVariable.getInvocationInfo().userName;
|
userEntityObject.setIp(ip);
|
userEntityObject.setUserName(loginUserName);
|
userEntityObject.setModules("");
|
ProcessCustomClientDelegate delegate = new ProcessCustomClientDelegate(userEntityObject);
|
String[] taskOids = new String[objs.length];
|
String[] executionIds = new String[objs.length];
|
String[] taskNames = new String[objs.length];
|
String[] taskStatuss = new String[objs.length];
|
for(int objectIndex=0;objectIndex<objs.length;objectIndex++){
|
IDataNode idn = (IDataNode) objs[objectIndex];
|
Map<String, String> valueMap = idn.getValueMap();
|
int j=0;
|
int k=0;
|
for(Entry<String, String> entrySet : valueMap.entrySet()){
|
if(entrySet.getKey()!=null&&entrySet.getKey().equals("Executionid".toLowerCase())){
|
executionIds[j] = entrySet.getValue();
|
j++;
|
}
|
if(entrySet.getKey()!=null&&entrySet.getKey().equals("Name".toLowerCase())){
|
taskNames[k] = entrySet.getValue().substring(entrySet.getValue().lastIndexOf("-")+1);
|
k++;
|
}
|
}
|
}
|
TaskAssignedForPlatformDialog dialog = new TaskAssignedForPlatformDialog(LogonApplication.frame,taskNames,executionIds);
|
|
return true;
|
}
|
}
|