You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.9 KiB
Java
81 lines
2.9 KiB
Java
3 years ago
|
package com.customization.workflow;
|
||
|
|
||
|
import com.alibaba.fastjson.JSON;
|
||
|
import com.alibaba.fastjson.JSONObject;
|
||
|
import com.cloudstore.dev.api.bean.MessageBean;
|
||
|
import com.cloudstore.dev.api.util.Util_Message;
|
||
|
import com.engine.core.cfg.annotation.CommandDynamicProxy;
|
||
|
import com.engine.core.interceptor.AbstractCommandProxy;
|
||
|
import com.engine.core.interceptor.Command;
|
||
|
import com.engine.msgcenter.util.CustomMessageTypeFactory;
|
||
|
import com.engine.workflow.cmd.requestForm.RequestSubmitCmd;
|
||
|
import com.engine.workflow.constant.requestForm.RequestExecuteType;
|
||
|
import com.engine.workflow.entity.requestForm.RequestOperationResultBean;
|
||
|
import com.google.common.collect.Sets;
|
||
|
|
||
|
import weaver.soa.workflow.request.Property;
|
||
|
import weaver.conn.RecordSet;
|
||
|
import weaver.general.Util;
|
||
|
import weaver.hrm.User;
|
||
|
import weaver.soa.workflow.request.RequestInfo;
|
||
|
import weaver.soa.workflow.request.RequestService;
|
||
|
import weaver.workflow.request.RequestDeleteUtils;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
|
||
|
import java.util.HashSet;
|
||
|
import java.util.Map;
|
||
|
import java.util.Set;
|
||
|
|
||
|
/**
|
||
|
* @Classname CustomRequestSubmitCmd
|
||
|
* @Description TODO()
|
||
|
* @Author wanxq
|
||
|
* @Date 2019年11月28日15:23:27
|
||
|
**/
|
||
|
|
||
|
@CommandDynamicProxy(target = RequestSubmitCmd.class, desc="流程提交后修改流程标题,加上流程类型")
|
||
|
public class CustomRequestSubmitCmd extends AbstractCommandProxy<Map<String,Object>> {
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public Map<String, Object> execute(Command<Map<String, Object>> targetCommand) {
|
||
|
//获取到被代理对象
|
||
|
RequestSubmitCmd requestSubmitCmd = (RequestSubmitCmd)targetCommand;
|
||
|
//获取被代理对象的参数
|
||
|
Map<String, Object> params = requestSubmitCmd.getParams();
|
||
|
//执行标准的业务处理
|
||
|
Map<String, Object> result = nextExecute(targetCommand);
|
||
|
//对返回值做加工处理
|
||
|
|
||
|
HttpServletRequest request = requestSubmitCmd.getRequest();
|
||
|
User user = User.getUser(1, 0);
|
||
|
|
||
|
RequestOperationResultBean resultBean = (RequestOperationResultBean) result.get("data");
|
||
|
String executeResult = resultBean.getType().name();
|
||
|
String deleteSubWf = Util.null2String(params.get("deleteSubWf"));//是否删除相关子流程
|
||
|
if("SUCCESS".equals(executeResult) && "1".equals(params.get("deleteSubWf"))){
|
||
|
String workflowid = Util.null2String(params.get("workflowid"));
|
||
|
String requestid = Util.null2String(params.get("requestid"));
|
||
|
RequestDeleteUtils rdu = new RequestDeleteUtils();
|
||
|
RecordSet rs = new RecordSet();
|
||
|
String subwfSql = " select cfzlcid from uf_zlccfb where zlcqqid="+requestid;
|
||
|
rs.execute(subwfSql);
|
||
|
while(rs.next()){
|
||
|
String cfzlcid = Util.null2String(rs.getString("cfzlcid"));
|
||
|
rdu.executeMonitorDelete(cfzlcid,user,request.getRemoteAddr());
|
||
|
|
||
|
}
|
||
|
rs.execute(" delete from uf_zlccfb where zlcqqid="+requestid);
|
||
|
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|