47 lines
1.8 KiB
Java
47 lines
1.8 KiB
Java
package com.actionsoft.apps.coe.pal.datamigration;
|
|
|
|
import com.actionsoft.apps.coe.pal.datamigration.Utils.UtilUrl;
|
|
import com.actionsoft.bpms.schedule.IJob;
|
|
import com.actionsoft.sdk.local.SDK;
|
|
import org.quartz.JobExecutionContext;
|
|
import org.quartz.JobExecutionException;
|
|
|
|
import java.io.IOException;
|
|
|
|
public class DaibanJob implements IJob {
|
|
@Override
|
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
String jobParameter = SDK.getJobAPI().getJobParameter(jobExecutionContext);
|
|
try {
|
|
readOa(jobParameter);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
public void readOa(String taskId) throws Exception {
|
|
String taskurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "taskurl");
|
|
String s = readOa(taskurl, taskId);
|
|
System.out.println("是否更新了这个代办》》》》》》》》》》"+s);
|
|
}
|
|
|
|
|
|
public String readOa(String url, String taskid) throws IOException {
|
|
String result = "true";
|
|
StringBuffer sendSoapString = new StringBuffer();
|
|
String xmlStr = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:com=\"com.synctooa.webservices\">\n" +
|
|
" <soapenv:Header/>\n" +
|
|
" <soapenv:Body>\n" +
|
|
" <com:updateRead>\n" +
|
|
" <com:in0>LCZD</com:in0>\n" +
|
|
" <com:in1>" + taskid + "</com:in1>\n" +
|
|
" </com:updateRead>\n" +
|
|
" </soapenv:Body>\n" +
|
|
"</soapenv:Envelope>";
|
|
|
|
System.out.println("xmlstr================" + xmlStr);
|
|
UtilUrl uc = new UtilUrl();
|
|
String postSoap = uc.doPostSoap(url, xmlStr, "");
|
|
return postSoap;
|
|
}
|
|
} |