|
@@ -1,6 +1,5 @@
|
|
|
package com.kingdee.eas.custom.projectbonus.task;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.kingdee.bos.BOSException;
|
|
|
import com.kingdee.bos.Context;
|
|
@@ -11,17 +10,12 @@ import com.kingdee.eas.basedata.person.PersonInfo;
|
|
|
import com.kingdee.eas.common.EASBizException;
|
|
|
import com.kingdee.eas.custom.notify.NotifyTodoFactory;
|
|
|
import com.kingdee.eas.custom.notify.SendContextInfo;
|
|
|
-import com.kingdee.eas.custom.notify.notifyTodo.ISysNotifyTodoWebService;
|
|
|
-import com.kingdee.eas.custom.notify.notifyTodo.ISysNotifyTodoWebServiceServiceLocator;
|
|
|
-import com.kingdee.eas.custom.notify.notifyTodo.NotifyTodoAppResult;
|
|
|
-import com.kingdee.eas.custom.notify.notifyTodo.NotifyTodoSendContext;
|
|
|
import com.kingdee.eas.custom.projectbonus.*;
|
|
|
import com.kingdee.eas.custom.utils.PropertiesUtil;
|
|
|
-import com.kingdee.util.DateTimeUtils;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.apache.log4j.Logger;
|
|
|
|
|
|
-import java.rmi.RemoteException;
|
|
|
+import java.net.URLEncoder;
|
|
|
import java.sql.Timestamp;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -87,18 +81,16 @@ public class ProjectbonusFacadeControllerBean extends AbstractProjectbonusFacade
|
|
|
context.setAppName("shr");
|
|
|
context.setModelName("shr_项目经营奖金模块");
|
|
|
context.setModelId(BOSUuid.create("projectbonus").toString());
|
|
|
- context.setLink("www.baidu.com");
|
|
|
StringBuilder subject = new StringBuilder();
|
|
|
subject.append("请您尽快提交 周期[" + cycleName + "] " + busDepMsg + "的奖金分配人员明细!");
|
|
|
context.setSubject(subject.toString());
|
|
|
- //http://10.0.64.221:6888/shr
|
|
|
- String link = String.format(linkTemplate, shrAddress, principalBusdepUipk, bonusCycleId);
|
|
|
+ String bonusCycleIdEncode = URLEncoder.encode(bonusCycleId);
|
|
|
+ String link = String.format(linkTemplate, shrAddress, principalBusdepUipk, bonusCycleIdEncode);
|
|
|
context.setLink(link);
|
|
|
//context.setType();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("LoginName", oaUserName);
|
|
|
- //JSONArray jsonArray = new JSONArray();
|
|
|
- //jsonArray.add(jsonObject);
|
|
|
+ //[{"LoginName":"liucanyu"},{"LoginName":"liucanyu1"}]
|
|
|
context.setTargets(jsonObject.toJSONString());
|
|
|
context.setCreateTime(new Timestamp(new Date().getTime()));
|
|
|
NotifyTodoFactory.getLocalInstance(ctx).sendTodo(context);
|
|
@@ -124,7 +116,7 @@ public class ProjectbonusFacadeControllerBean extends AbstractProjectbonusFacade
|
|
|
return "事业部[" + busdepName + "]";
|
|
|
}
|
|
|
}
|
|
|
-// public static void main(String[] args) throws RemoteException, javax.xml.rpc.ServiceException {
|
|
|
+ // public static void main(String[] args) throws javax.xml.rpc.ServiceException {
|
|
|
// ISysNotifyTodoWebServiceServiceLocator iSysNotifyTodoWebServiceServiceLocator = new ISysNotifyTodoWebServiceServiceLocator();
|
|
|
// ISysNotifyTodoWebService iSysNotifyTodoWebServicePort = iSysNotifyTodoWebServiceServiceLocator.getISysNotifyTodoWebServicePort();
|
|
|
// NotifyTodoSendContext notInfo = new NotifyTodoSendContext();
|
|
@@ -150,5 +142,8 @@ public class ProjectbonusFacadeControllerBean extends AbstractProjectbonusFacade
|
|
|
// NotifyTodoAppResult notifyTodoAppResult = iSysNotifyTodoWebServicePort.sendTodo(notInfo);
|
|
|
// System.out.println(notifyTodoAppResult.getReturnState());
|
|
|
// System.out.println(notifyTodoAppResult.getMessage());
|
|
|
-// }
|
|
|
+
|
|
|
+ //String encode = URLEncoder.encode("+ng+o0EHRTuIAsGjqwaF+7mfTD4=");
|
|
|
+ //System.out.println(encode);
|
|
|
+ //}
|
|
|
}
|