|
@@ -12,6 +12,7 @@ import com.management.platform.mapper.*;
|
|
import com.management.platform.service.*;
|
|
import com.management.platform.service.*;
|
|
import com.management.platform.service.impl.WxCorpInfoServiceImpl;
|
|
import com.management.platform.service.impl.WxCorpInfoServiceImpl;
|
|
import com.management.platform.util.*;
|
|
import com.management.platform.util.*;
|
|
|
|
+import com.management.platform.webservice.po.*;
|
|
import jdk.nashorn.internal.ir.ContinueNode;
|
|
import jdk.nashorn.internal.ir.ContinueNode;
|
|
import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage;
|
|
import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage;
|
|
import me.chanjar.weixin.mp.api.WxMpService;
|
|
import me.chanjar.weixin.mp.api.WxMpService;
|
|
@@ -1541,4 +1542,42 @@ public class TimingTask {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public static void main(String[] args) throws Exception {
|
|
|
|
+ XmlRequestData xmlRequestData=new XmlRequestData();
|
|
|
|
+ ProcessingConditions processingConditions=new ProcessingConditions();
|
|
|
|
+ processingConditions.setQueryHitsUnlimitedIndicator("true");
|
|
|
|
+ xmlRequestData.setProcessingConditions(processingConditions);
|
|
|
|
+ ProjectSelectionByElement projectSelectionByElement=new ProjectSelectionByElement();
|
|
|
|
+ SelectionByLastChangeDateTime selectionByLastChangeDateTime=new SelectionByLastChangeDateTime();
|
|
|
|
+ selectionByLastChangeDateTime.setInclusionExclusionCode("I");
|
|
|
|
+ selectionByLastChangeDateTime.setIntervalBoundaryTypeCode("3");
|
|
|
|
+ selectionByLastChangeDateTime.setLowerBoundaryLastChangeDateTime("2023-09-01T00:00:00Z");
|
|
|
|
+ selectionByLastChangeDateTime.setUpperBoundaryLastChangeDateTime("2023-10-01T00:00:00Z");
|
|
|
|
+ projectSelectionByElement.setSelectionByLastChangeDateTime(selectionByLastChangeDateTime);
|
|
|
|
+ List<ProjectSelectionByElement> list=new ArrayList<>();
|
|
|
|
+ list.add(projectSelectionByElement);
|
|
|
|
+ xmlRequestData.setProjectSelectionByElements(list);
|
|
|
|
+ String xml = CommonUtils.convertToXml(xmlRequestData);
|
|
|
|
+ xml=xml.substring(xml.indexOf("<XMLDATA>")+9,xml.lastIndexOf("</XMLDATA>"));
|
|
|
|
+ StringBuffer sb = new StringBuffer();
|
|
|
|
+ sb.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:glob=\"http://sap.com/xi/SAPGlobal20/Global\">\n" +
|
|
|
|
+ " <soapenv:Header/>\n" +
|
|
|
|
+ " <soapenv:Body>\n" +
|
|
|
|
+ " <glob:ProjectByElementsQuery>\n");
|
|
|
|
+ sb.append(xml);
|
|
|
|
+ sb.append(" </glob:ProjectByElementsQuery>\n" +
|
|
|
|
+ " </soapenv:Body>\n" +
|
|
|
|
+ "</soapenv:Envelope>");
|
|
|
|
+ System.out.println(sb.toString());
|
|
|
|
+ String result = WebServiceUtils.requestByXml("https://my602728.sapbyd.cn/sap/bc/srt/scs/sap/queryprojectin?sap-vhost=my602728.sapbyd.cn", sb.toString(), 0, "_BYDHOST", "Welcome1");
|
|
|
|
+ if(!StringUtils.isEmpty(result)) {
|
|
|
|
+ result = result.substring(result.indexOf("<soap-env:Body>")+15, result.lastIndexOf("</soap-env:Body>"));
|
|
|
|
+ result = result.substring(result.indexOf(">")+1, result.lastIndexOf("</n0:ProjectByElementsResponse_sync>"));
|
|
|
|
+ result="<XMLDATA>"+result+"</XMLDATA>";
|
|
|
|
+ }
|
|
|
|
+ System.out.println(result);
|
|
|
|
+ XmlResponseData xmlResponseData = (XmlResponseData) CommonUtils.convertXmlStrToObject(XmlResponseData.class, result);
|
|
|
|
+ System.out.println(xmlResponseData);
|
|
|
|
+ }
|
|
}
|
|
}
|