|
@@ -1,10 +1,14 @@
|
|
package com.galaxis.manatee.webservice;
|
|
package com.galaxis.manatee.webservice;
|
|
|
|
|
|
|
|
|
|
|
|
+import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.galaxis.manatee.chuanyun_web_service.*;
|
|
import com.galaxis.manatee.chuanyun_web_service.*;
|
|
|
|
+import com.galaxis.manatee.entity.chuanyun.dto.ChuanyunWebServiceDTO;
|
|
import com.galaxis.manatee.task.ChuanyunBasicDataScheduledTask;
|
|
import com.galaxis.manatee.task.ChuanyunBasicDataScheduledTask;
|
|
import com.galaxis.manatee.task.ChuanyunHumanResourceScheduledTask;
|
|
import com.galaxis.manatee.task.ChuanyunHumanResourceScheduledTask;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.apache.tomcat.util.json.JSONParser;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.ws.server.endpoint.annotation.Endpoint;
|
|
import org.springframework.ws.server.endpoint.annotation.Endpoint;
|
|
import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
|
|
import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
|
|
@@ -60,9 +64,10 @@ public class CountryEndpoint {
|
|
*/
|
|
*/
|
|
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "Invoke")
|
|
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "Invoke")
|
|
@ResponsePayload
|
|
@ResponsePayload
|
|
- public InvokeResponse invoke(@RequestPayload Invoke request) {
|
|
|
|
|
|
+ public InvokeResponse invoke(@RequestPayload Invoke request) throws JsonProcessingException {
|
|
//书写调用第三方接口方法
|
|
//书写调用第三方接口方法
|
|
log.info("开始数据同步");
|
|
log.info("开始数据同步");
|
|
|
|
+ var objectMapper=new ObjectMapper();
|
|
InvokeResponse invokeResponse=new InvokeResponse();
|
|
InvokeResponse invokeResponse=new InvokeResponse();
|
|
chuanyunHumanResourceScheduledTask.getPayrollManually();
|
|
chuanyunHumanResourceScheduledTask.getPayrollManually();
|
|
chuanyunBasicDataScheduledTask.getUserCompanyManually();
|
|
chuanyunBasicDataScheduledTask.getUserCompanyManually();
|
|
@@ -71,7 +76,10 @@ public class CountryEndpoint {
|
|
chuanyunBasicDataScheduledTask.getReimbursementItemsManually();
|
|
chuanyunBasicDataScheduledTask.getReimbursementItemsManually();
|
|
chuanyunBasicDataScheduledTask.getGroupProjectForSynchronizationManually();
|
|
chuanyunBasicDataScheduledTask.getGroupProjectForSynchronizationManually();
|
|
log.info("数据同步成功");
|
|
log.info("数据同步成功");
|
|
- invokeResponse.setResponse("{}");
|
|
|
|
|
|
+ ChuanyunWebServiceDTO chuanyunWebServiceDTO = new ChuanyunWebServiceDTO();
|
|
|
|
+ chuanyunWebServiceDTO.setMessage("后台数据开始更新,预计数据更新时间10分钟,请稍后查看");
|
|
|
|
+ chuanyunWebServiceDTO.setResultCode("0");
|
|
|
|
+ invokeResponse.setResponse(objectMapper.writeValueAsString(chuanyunWebServiceDTO));
|
|
return invokeResponse;
|
|
return invokeResponse;
|
|
}
|
|
}
|
|
}
|
|
}
|