2024-11-13 10:35:26 +00:00
|
|
|
package shkd.todotask;
|
|
|
|
|
2024-11-16 05:29:28 +00:00
|
|
|
import kd.bos.form.FormShowParameter;
|
2024-11-13 10:35:26 +00:00
|
|
|
import kd.bos.logging.Log;
|
|
|
|
import kd.bos.logging.LogFactory;
|
2024-11-16 05:29:28 +00:00
|
|
|
import kd.bos.mvc.form.FormView;
|
2024-11-13 10:35:26 +00:00
|
|
|
import kd.bos.workflow.taskcenter.plugin.validate.IApprovalSubPlugin;
|
|
|
|
import shkd.utils.OAUtils;
|
|
|
|
|
2024-11-16 05:29:28 +00:00
|
|
|
import java.util.HashMap;
|
2024-11-13 10:35:26 +00:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 待办提交关闭页面
|
|
|
|
*/
|
|
|
|
public class closeTaskPagePlugin implements IApprovalSubPlugin {
|
|
|
|
private static final Log logger = LogFactory.getLog(closeTaskPagePlugin.class);
|
|
|
|
@Override
|
|
|
|
public boolean executeClosePageAfterSubmitTask(boolean isPCShow, Map<String, Object> customParams) {
|
|
|
|
logger.info("进入页面关闭方法");
|
2024-11-16 05:29:28 +00:00
|
|
|
boolean flag = false;
|
|
|
|
FormView view = (FormView) customParams.get("formView");
|
|
|
|
FormShowParameter parameter = view.getFormShowParameter();
|
|
|
|
logger.info("获取view对象成功");
|
|
|
|
HashMap<String,Object> map = new HashMap<>();
|
|
|
|
if (parameter.getCustomParams().containsKey("apptype")) {
|
|
|
|
String apptype = parameter.getCustomParam("apptype");
|
|
|
|
if ("zhiyuan".equals(apptype)) {
|
|
|
|
try {
|
|
|
|
view.close();
|
|
|
|
}catch (Exception e) {
|
|
|
|
logger.info("发送指令时异常" + e.getMessage());
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
}
|
|
|
|
flag = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return flag;
|
2024-11-13 10:35:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|