Explorar el Código

更新sf域名

hanwenjie hace 3 años
padre
commit
b6c3c11599
Se han modificado 18 ficheros con 80 adiciones y 49 borrados
  1. 23 4
      code/sapparent/sapcms/src/main/java/org/fouram/controller/ReportController.java
  2. 2 2
      code/sapparent/sapservice/src/main/java/org/fouram/core/base/service/BaseService.java
  3. 1 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapBankService.java
  4. 1 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapContractService.java
  5. 1 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapEmpEmploymentService.java
  6. 2 2
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapEmpJobService.java
  7. 1 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapEmpTerminationService.java
  8. 13 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapEmployeeTimeService.java
  9. 5 5
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapOrgService.java
  10. 2 2
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapPerGlobalInfoCHNService.java
  11. 1 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapPerNationalIdService.java
  12. 1 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapPerPersonRelationshipService.java
  13. 2 2
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapPerPersonalService.java
  14. 1 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapPersonService.java
  15. 1 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapPersonalService.java
  16. 18 18
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapReportService.java
  17. 1 1
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapTimeTypeService.java
  18. 4 4
      code/sapparent/sapservice/src/main/java/org/fouram/service/SapUserService.java

+ 23 - 4
code/sapparent/sapcms/src/main/java/org/fouram/controller/ReportController.java

@@ -6,6 +6,7 @@ import org.fouram.core.util.AppUtil;
 import org.fouram.core.util.AppUtil.ResultConstant;
 import org.fouram.core.util.LoggerUtil;
 import org.fouram.job.CheckTaskSchedule;
+import org.fouram.service.SapEmployeeTimeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -20,9 +21,12 @@ public class ReportController extends BaseController {
 	@Autowired
 	private CheckTaskSchedule checkTaskSchedule;
 
+	@Autowired
+	private SapEmployeeTimeService sapEmployeeTimeService;
+
 	/**
 	 * http://localhost:8080/sapcms/report/saveReportData?checkinDay=2020-07-27
-	 * 
+	 *
 	 * @return
 	 */
 	@GetMapping(value = "/saveReportData", produces = "application/json;charset=utf-8")
@@ -43,10 +47,25 @@ public class ReportController extends BaseController {
 			return AppUtil.error(ResultConstant.WEB_ERR_MSG);
 		}
 	}
-	
+
+	@GetMapping(value = "/testSap", produces = "application/json;charset=utf-8")
+	@ResponseBody
+	public Object testSap(@RequestParam("userId") String userId) {
+		try {
+			if (StringUtils.isBlank(userId)) {
+				return AppUtil.error("参数userId为空");
+			}
+			sapEmployeeTimeService.testPush(userId);
+			return AppUtil.success();
+		} catch (Exception e) {
+			LoggerUtil.error(e);
+			return AppUtil.error(ResultConstant.WEB_ERR_MSG);
+		}
+	}
+
 	/**
 	 * http://localhost:8080/sapcms/report/reloadReportData
-	 * 
+	 *
 	 * @return
 	 */
 	@GetMapping(value = "/reloadReportData", produces = "application/json;charset=utf-8")
@@ -67,4 +86,4 @@ public class ReportController extends BaseController {
 			return AppUtil.error(ResultConstant.WEB_ERR_MSG);
 		}
 	}
-}
+}

+ 2 - 2
code/sapparent/sapservice/src/main/java/org/fouram/core/base/service/BaseService.java

@@ -143,7 +143,7 @@ public abstract class BaseService {
 	}
 
 	private String getPicklistLabelUrl(String optionId) {
-		return "https://api15.sapsf.cn/odata/v2/PicklistLabel(locale='zh_CN',optionId=" + optionId + ")?$format=json";
+		return "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PicklistLabel(locale='zh_CN',optionId=" + optionId + ")?$format=json";
 	}
 
 	public String getLabelValue(String optionId) {
@@ -164,7 +164,7 @@ public abstract class BaseService {
 			return value;
 		}
 	}
-	
+
 	public static JSONObject getPageResult(List<? extends Object> list, Object total) {
 		JSONObject object = new JSONObject();
 		object.put("total", total);

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapBankService.java

@@ -15,7 +15,7 @@ public class SapBankService extends BaseService {
 	public void saveSapData() throws Exception {
 		delete("SapBankMapper.deleteAll", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/cust_bank?$format=json&$expand=cust_bankNav";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/cust_bank?$format=json&$expand=cust_bankNav";
 		JsonNode node = requestService.getForObject(url, getHttpHeaders());
 		if (node != null) {
 			Iterator<JsonNode> iterator = node.get("d").get("results").elements();

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapContractService.java

@@ -18,7 +18,7 @@ public class SapContractService extends BaseService {
 
 		delete("SapContractMapper.deleteAll", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/cust_Contract?$format=json&$expand=cust_LegalNav";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/cust_Contract?$format=json&$expand=cust_LegalNav";
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
 			Iterator<JsonNode> iterator = node.get("d").get("results").elements();

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapEmpEmploymentService.java

@@ -21,7 +21,7 @@ public class SapEmpEmploymentService extends BaseService {
 	private RequestService requestService;
 
 	public void setEmpInfo(List<SapUser> sapUsers) {
-		String url = "https://api15.sapsf.cn/odata/v2/EmpEmployment?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmpEmployment?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode jsonNode = requestService.getForObject(url, getHttpHeaders());
 		Map<String, String> startDateMap = Maps.newHashMap();

+ 2 - 2
code/sapparent/sapservice/src/main/java/org/fouram/service/SapEmpJobService.java

@@ -23,7 +23,7 @@ public class SapEmpJobService extends BaseService {
 	private RequestService requestService;
 
 	public void setPosition(List<SapUser> sapUsers) {
-		String url = "https://api15.sapsf.cn/odata/v2/EmpJob?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmpJob?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, getHttpHeaders());
 		Map<String, String> jobTitleMap = Maps.newHashMap();
@@ -45,7 +45,7 @@ public class SapEmpJobService extends BaseService {
 	public void saveSapData() throws Exception {
 		delete("SapEmpJobMapper.deleteAll", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/EmpJob?$format=json"
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmpJob?$format=json"
 				+ "&$expand=positionNav,companyNav,businessUnitNav,divisionNav,departmentNav,customString19Nav,locationNav,jobCodeNav";
 		JsonNode node = requestService.getForObject(url, getHttpHeaders());
 		if (node != null) {

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapEmpTerminationService.java

@@ -18,7 +18,7 @@ public class SapEmpTerminationService extends BaseService {
 	private RequestService requestService;
 
 	public void saveSapData() throws Exception {
-		String url = "https://api15.sapsf.cn/odata/v2/EmpEmploymentTermination?$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmpEmploymentTermination?$format=json";
 		JsonNode node = requestService.getForObject(url, getHttpHeaders());
 		if (node != null) {
 			Iterator<JsonNode> iterator = node.get("d").get("results").elements();

+ 13 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapEmployeeTimeService.java

@@ -4,6 +4,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
+import lombok.extern.slf4j.Slf4j;
 import org.fouram.core.base.service.BaseService;
 import org.fouram.core.base.service.RequestService;
 import org.fouram.core.util.JsonNodeUtil;
@@ -14,6 +15,7 @@ import org.springframework.stereotype.Service;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.google.common.collect.Sets;
 
+@Slf4j
 @Service
 public class SapEmployeeTimeService extends BaseService {
 
@@ -22,12 +24,22 @@ public class SapEmployeeTimeService extends BaseService {
 	@Autowired
 	private WxUserService wxUserService;
 
+	public void testPush(String userId){
+		String url = String.format("https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmployeeTime?$filter=userId in %s&$format=json",
+				userId);
+		log.info("url = {} ,headers = {}",url,getHttpHeaders());
+		JsonNode node = requestService.getForObject(url, getHttpHeaders());
+		log.info("response = {}",node);
+	}
+
 	@SuppressWarnings("unchecked")
 	public void saveEmployeeTimes() throws Exception {
 		List<String> allSapUserIds = wxUserService.selectSapUserId();
 		String url = null;
 		for (String userId : allSapUserIds) {
-			url = String.format("https://api15.sapsf.cn/odata/v2/EmployeeTime?$filter=userId in %s&$format=json",
+//			url = String.format("https://api15.sapsf.cn/odata/v2/EmployeeTime?$filter=userId in %s&$format=json",
+//					userId);
+			url = String.format("https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmployeeTime?$filter=userId in %s&$format=json",
 					userId);
 			JsonNode node = requestService.getForObject(url, getHttpHeaders());
 			SapEmployeeTime dbEmployeeTime = null;

+ 5 - 5
code/sapparent/sapservice/src/main/java/org/fouram/service/SapOrgService.java

@@ -31,7 +31,7 @@ public class SapOrgService extends BaseService {
 
 	// FOCompany->FOBusinessUnit->FODivision->FODepartment->cust_orgunit4/cust_org4
 	private Map<String, String> getOrgMap(HttpHeaders headers, String entityName) throws Exception {
-		String url = "https://api15.sapsf.cn/odata/v2/" + entityName + "?$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/" + entityName + "?$format=json";
 		JsonNode node = requestService.getForObject(url, headers);
 		Map<String, String> empInfo = Maps.newHashMap();
 		if (node != null) {
@@ -83,7 +83,7 @@ public class SapOrgService extends BaseService {
 			userIds += "'" + sapUser.getUserId() + "',";
 			map.put(sapUser.getUserId(), sapUser);
 		}
-		String empUrl = "https://api15.sapsf.cn/odata/v2/EmpJob?$filter=userId in " + userIds + "&$format=json";
+		String empUrl = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmpJob?$filter=userId in " + userIds + "&$format=json";
 		JsonNode node = requestService.getForObject(empUrl, headers);
 		if (node != null) {
 			Iterator<JsonNode> iterator = node.get("d").get("results").elements();
@@ -137,12 +137,12 @@ public class SapOrgService extends BaseService {
 			SapOrg sencodOrg = selectById(user.getSecondOrgId());
 			sencodOrg.setWxDepartId(getWxDepartId(sencodOrg, firstOrg.getWxDepartId()));
 			allOrgs.add(sencodOrg);
-			
+
 			if(StringUtils.isNotBlank(user.getThirdOrgId())) {
 				SapOrg thirdOrg = selectById(user.getThirdOrgId());
 				thirdOrg.setWxDepartId(getWxDepartId(thirdOrg, sencodOrg.getWxDepartId()));
 				allOrgs.add(thirdOrg);
-				
+
 				if (StringUtils.isNotBlank(user.getFourthOrgId())) {
 					SapOrg fourthOrg = selectById(user.getFourthOrgId());
 					fourthOrg.setWxDepartId(getWxDepartId(fourthOrg, thirdOrg.getWxDepartId()));
@@ -195,7 +195,7 @@ public class SapOrgService extends BaseService {
 		}
 		return sapOrgs;
 	}
-	
+
 	@SuppressWarnings("unchecked")
 	public List<SapOrg> selectFirstOrgList() throws Exception {
 		return (List<SapOrg>) findList("SapOrgMapper.selectFirstOrgList", null);

+ 2 - 2
code/sapparent/sapservice/src/main/java/org/fouram/service/SapPerGlobalInfoCHNService.java

@@ -15,10 +15,10 @@ public class SapPerGlobalInfoCHNService extends BaseService {
 
 	public void saveSapData() throws Exception {
 		HttpHeaders headers = getHttpHeaders();
-		
+
 		delete("SapPerGlobalInfoCHNMapper.deleteAll", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerGlobalInfoCHN?$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerGlobalInfoCHN?$format=json";
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
 			Iterator<JsonNode> iterator = node.get("d").get("results").elements();

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapPerNationalIdService.java

@@ -21,7 +21,7 @@ public class SapPerNationalIdService extends BaseService {
 	private RequestService requestService;
 
 	public void setCardInfo(List<SapUser> sapUsers) {
-		String url = "https://api15.sapsf.cn/odata/v2/PerNationalId?$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerNationalId?$format=json";
 		JsonNode jsonNode = requestService.getForObject(url, getHttpHeaders());
 		Map<String, String> nationalIdMap = Maps.newHashMap();
 		Map<String, String> cardTypeMap = Maps.newHashMap();

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapPerPersonRelationshipService.java

@@ -19,7 +19,7 @@ public class SapPerPersonRelationshipService extends BaseService {
 
 		delete("SapPerPersonRelationshipMapper.deleteAll", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerPersonRelationship?$format=json&$expand=relPersonNav";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerPersonRelationship?$format=json&$expand=relPersonNav";
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
 			Iterator<JsonNode> iterator = node.get("d").get("results").elements();

+ 2 - 2
code/sapparent/sapservice/src/main/java/org/fouram/service/SapPerPersonalService.java

@@ -13,10 +13,10 @@ import com.fasterxml.jackson.databind.JsonNode;
 public class SapPerPersonalService extends BaseService {
 
 	public void saveSapData() throws Exception {
-		
+
 		delete("SapPerPersonalMapper.deleteAll", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerPersonal?$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerPersonal?$format=json";
 		JsonNode node = requestService.getForObject(url, getHttpHeaders());
 		if (node != null) {
 			Iterator<JsonNode> iterator = node.get("d").get("results").elements();

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapPersonService.java

@@ -15,7 +15,7 @@ public class SapPersonService extends BaseService {
 	public void saveSapData() throws Exception {
 		delete("SapPerPersonMapper.deleteAll", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerPerson?$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerPerson?$format=json";
 		JsonNode node = requestService.getForObject(url, getHttpHeaders());
 		if (node != null) {
 			Iterator<JsonNode> iterator = node.get("d").get("results").elements();

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapPersonalService.java

@@ -32,7 +32,7 @@ public class SapPersonalService extends BaseService {
 			}
 			map.get(sapUser.getPersonId()).add(sapUser);
 		}
-		String url = "https://api15.sapsf.cn/odata/v2/PerPersonal?$filter=personIdExternal in " + personIds
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerPersonal?$filter=personIdExternal in " + personIds
 				+ "&$format=json";
 		JsonNode node = requestService.getForObject(url, getHttpHeaders());
 		if (node != null) {

+ 18 - 18
code/sapparent/sapservice/src/main/java/org/fouram/service/SapReportService.java

@@ -91,7 +91,7 @@ public class SapReportService extends BaseService {
 	public void saveSapPerPerson(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapPerPerson", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerPerson?$filter=personIdExternal in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerPerson?$filter=personIdExternal in %s&$format=json";
 		url = String.format(url, getPersonIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -113,7 +113,7 @@ public class SapReportService extends BaseService {
 	public void saveSapPerPersonal(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapPerPersonal", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerPersonal?$filter=personIdExternal in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerPersonal?$filter=personIdExternal in %s&$format=json";
 		url = String.format(url, getPersonIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -145,7 +145,7 @@ public class SapReportService extends BaseService {
 	public void saveSapPerGlobalInfoCHN(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapPerGlobalInfoCHN", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerGlobalInfoCHN?$filter=personIdExternal in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerGlobalInfoCHN?$filter=personIdExternal in %s&$format=json";
 		url = String.format(url, getPersonIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -171,7 +171,7 @@ public class SapReportService extends BaseService {
 	public void saveSapPerNationalId(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapPerNationalId", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerNationalId?$filter=personIdExternal in %s&$format=json&$expand=countryNav";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerNationalId?$filter=personIdExternal in %s&$format=json&$expand=countryNav";
 		url = String.format(url, getPersonIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -193,7 +193,7 @@ public class SapReportService extends BaseService {
 	public void saveSapPerEmail(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapPerEmail", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerEmail?$filter=personIdExternal in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerEmail?$filter=personIdExternal in %s&$format=json";
 		url = String.format(url, getPersonIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -216,7 +216,7 @@ public class SapReportService extends BaseService {
 	public void saveSapPerPhone(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapPerPhone", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerPhone?$filter=personIdExternal in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerPhone?$filter=personIdExternal in %s&$format=json";
 		url = String.format(url, getPersonIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -238,7 +238,7 @@ public class SapReportService extends BaseService {
 	public void saveSapPerSocialAccount(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapPerSocialAccount", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/PerSocialAccount?$filter=personIdExternal in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PerSocialAccount?$filter=personIdExternal in %s&$format=json";
 		url = String.format(url, getPersonIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -259,7 +259,7 @@ public class SapReportService extends BaseService {
 	public void saveSapEmpEmployment(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapEmpEmployment", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/EmpEmployment?$filter=personIdExternal in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmpEmployment?$filter=personIdExternal in %s&$format=json";
 		url = String.format(url, getPersonIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -292,7 +292,7 @@ public class SapReportService extends BaseService {
 	public void saveSapEmpJob(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapEmpJob", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/EmpJob?$filter=userId in %s&$format=json"
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmpJob?$filter=userId in %s&$format=json"
 				+ "&$expand=positionNav,companyNav,businessUnitNav,divisionNav,departmentNav,customString19Nav,locationNav,jobCodeNav";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
@@ -330,7 +330,7 @@ public class SapReportService extends BaseService {
 	public void saveSapEmpJobRelationships(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapEmpJobRelationships", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/EmpJobRelationships?$filter=userId in %s&$format=json&$expand=relUserNav";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/EmpJobRelationships?$filter=userId in %s&$format=json&$expand=relUserNav";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -352,7 +352,7 @@ public class SapReportService extends BaseService {
 	public void saveSapOutsideWorkExperience(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapOutsideWorkExperience", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/Background_OutsideWorkExperience?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/Background_OutsideWorkExperience?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -383,7 +383,7 @@ public class SapReportService extends BaseService {
 	public void saveSapInsideWorkExperience(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapInsideWorkExperience", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/Background_InsideWorkExperience?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/Background_InsideWorkExperience?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -406,7 +406,7 @@ public class SapReportService extends BaseService {
 	public void saveSapCourses(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapCourses", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/Background_Courses?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/Background_Courses?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -436,7 +436,7 @@ public class SapReportService extends BaseService {
 	public void saveSapEducation(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapEducation", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/Background_Education?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/Background_Education?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -461,7 +461,7 @@ public class SapReportService extends BaseService {
 	public void saveSapCertificates(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapCertificates", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/Background_Certificates?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/Background_Certificates?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -485,7 +485,7 @@ public class SapReportService extends BaseService {
 	public void saveSapLanguages(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapLanguages", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/Background_Languages?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/Background_Languages?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -508,7 +508,7 @@ public class SapReportService extends BaseService {
 	public void saveSapOverallPerformance(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
 		delete("SapReportMapper.deleteSapOverallPerformance", null);
 
-		String url = "https://api15.sapsf.cn/odata/v2/TrendData_SysOverallPerformance?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/TrendData_SysOverallPerformance?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, headers);
 		if (node != null) {
@@ -537,7 +537,7 @@ public class SapReportService extends BaseService {
 		} else {
 			String value = "";
 			try {
-				String url = "https://api15.sapsf.cn/odata/v2/PicklistLabel(locale='zh_CN',optionId=" + optionId
+				String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/PicklistLabel(locale='zh_CN',optionId=" + optionId
 						+ ")?$format=json";
 				JsonNode node = requestService.getForObject(url, getHttpHeaders());
 				value = JsonNodeUtil.getValue(node, "d", "label");

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/SapTimeTypeService.java

@@ -21,7 +21,7 @@ public class SapTimeTypeService extends BaseService {
 	private RequestService requestService;
 
 	public Map<String, String> getTimeTypeMap(List<SapUser> sapUsers) {
-		String url = "https://api15.sapsf.cn/odata/v2/TimeType?$filter=userId in %s&$format=json";
+		String url = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/TimeType?$filter=userId in %s&$format=json";
 		url = String.format(url, getUserIds(sapUsers));
 		JsonNode node = requestService.getForObject(url, getHttpHeaders());
 		Map<String, String> map = Maps.newHashMap();

+ 4 - 4
code/sapparent/sapservice/src/main/java/org/fouram/service/SapUserService.java

@@ -93,7 +93,7 @@ public class SapUserService extends BaseService {
 
 	public void saveOrUpdateSapUsers() throws Exception {
 		HttpHeaders headers = getHttpHeaders();
-		String userUrl = "https://api15.sapsf.cn/odata/v2/User?$filter=status in 'active'&$format=json&$expand=personKeyNav";
+		String userUrl = "https://api.cf.cn40.platform.sapcloud.cn/odata/v2/User?$filter=status in 'active'&$format=json&$expand=personKeyNav";
 		// get
 		JsonNode node = requestService.getForObject(userUrl, headers);
 		List<SapUser> sapUsers = Lists.newArrayList();
@@ -192,7 +192,7 @@ public class SapUserService extends BaseService {
 
 	/**
 	 * 更新异常情况,敏感数据、入职
-	 * 
+	 *
 	 * @throws Exception
 	 */
 	public void updateAbnormalResult() throws Exception {
@@ -225,7 +225,7 @@ public class SapUserService extends BaseService {
 
 	/**
 	 * 根据personId查询多个用户完整的机构名称信息
-	 * 
+	 *
 	 * @param sapUsers
 	 * @return
 	 * @throws Exception
@@ -245,7 +245,7 @@ public class SapUserService extends BaseService {
 
 	/**
 	 * 拼接多用户的职务
-	 * 
+	 *
 	 * @param sapUsers
 	 * @return
 	 * @throws Exception