|
|
@@ -9,6 +9,7 @@ import com.usoftchina.uas.office.qywx.entity.Employee;
|
|
|
import com.usoftchina.uas.office.qywx.manage.entity.QywxAgent;
|
|
|
import com.usoftchina.uas.office.qywx.manage.service.QywxAgentService;
|
|
|
import com.usoftchina.uas.office.qywx.service.UasAnalysisService;
|
|
|
+import com.usoftchina.uas.office.qywx.service.UasConfigsService;
|
|
|
import com.usoftchina.uas.office.qywx.service.UasEmployeeService;
|
|
|
import com.usoftchina.uas.office.qywx.service.UasJProcessService;
|
|
|
import org.slf4j.Logger;
|
|
|
@@ -39,6 +40,8 @@ public class QywxProcessTask {
|
|
|
|
|
|
@Autowired
|
|
|
private QywxAgentService agentService;
|
|
|
+ @Autowired
|
|
|
+ private UasConfigsService uasConfigsService;
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(QywxProcessTask.class);
|
|
|
|
|
|
@@ -64,14 +67,15 @@ public class QywxProcessTask {
|
|
|
if(remindList.size() > 0){
|
|
|
StringBuffer content = new StringBuffer();
|
|
|
content.append("**您有<font color=blue>"+remindList.get(0).get("COUNTS")+"</font>个审批单还未处理**\n" );
|
|
|
- for (Map<String,Object> remind: remindList) {
|
|
|
- String paramsStr = "{\"master\":\"" + remind.get("CURRENTMASTER") + "\",\"nodeId\":" + remind.get("JP_NODEID") + ",\"baseUrl\":\"" + URLEncoder.encode(agent.getOuterUrl(), "utf-8") + "\"}";
|
|
|
- String msgUrl = UrlUtils.generateOAuthUrl(messageSdk.getCorpId(), dataCenter.getUsername(), "Uas", agent.getOuterUrl(),
|
|
|
- dataCenter.getOuterUrl() + "api/authorize", "uas/approval/" + URLEncoder.encode(paramsStr, "utf-8"));
|
|
|
- content.append("> 【停留").append(remind.get("PASSTIME")).append("天】\n ")
|
|
|
- .append(remind.get("JP_LAUNCHERNAME")).append("的[").append(remind.get("JP_NAME")).append("]("+msgUrl+")\n");
|
|
|
- }
|
|
|
- if(Integer.valueOf(String.valueOf(remindList.get(0).get("COUNTS")))>2){
|
|
|
+ Map<String,Object> remind = remindList.get(0);
|
|
|
+// for (Map<String,Object> remind: remindList) {
|
|
|
+ String paramsStr = "{\"master\":\"" + remind.get("CURRENTMASTER") + "\",\"nodeId\":" + remind.get("JP_NODEID") + ",\"baseUrl\":\"" + URLEncoder.encode(agent.getOuterUrl(), "utf-8") + "\"}";
|
|
|
+ String msgUrl = UrlUtils.generateOAuthUrl(messageSdk.getCorpId(), dataCenter.getUsername(), "Uas", agent.getOuterUrl(),
|
|
|
+ dataCenter.getOuterUrl() + "api/authorize", "uas/approval/" + URLEncoder.encode(paramsStr, "utf-8"));
|
|
|
+ content.append("> 【停留").append(remind.get("PASSTIME")).append("天】\n ")
|
|
|
+ .append(remind.get("JP_LAUNCHERNAME")).append("的[").append(remind.get("JP_NAME")).append("]("+msgUrl+")\n");
|
|
|
+// }
|
|
|
+ if(Integer.valueOf(String.valueOf(remindList.get(0).get("COUNTS")))>1){
|
|
|
String moreUrl = UrlUtils.generateOAuthUrl(messageSdk.getCorpId(), dataCenter.getUsername(), "Uas", agent.getOuterUrl(),
|
|
|
dataCenter.getOuterUrl() + "api/authorize", "uas/uasApproval/"+dataCenter.getUsername()+"/receive");
|
|
|
content.append("[更多...](").append(moreUrl).append(")");
|