|
@@ -31,6 +31,7 @@ import org.fouram.entity.SapEmpJob;
|
|
|
import org.fouram.entity.SapMessageUser;
|
|
|
import org.fouram.entity.SapOrg;
|
|
|
import org.fouram.entity.SapPerGlobalInfoCHN;
|
|
|
+import org.fouram.entity.SapPerPerson;
|
|
|
import org.fouram.entity.SapPerPersonRelationship;
|
|
|
import org.fouram.entity.SapUser;
|
|
|
import org.fouram.entity.WxUser;
|
|
@@ -65,6 +66,8 @@ public class SapUserService extends BaseService {
|
|
|
@Autowired
|
|
|
private SapEmpJobService empJobService;
|
|
|
@Autowired
|
|
|
+ private SapPersonService personService;
|
|
|
+ @Autowired
|
|
|
private SapEmpJobService sapEmpJobService;
|
|
|
@Autowired
|
|
|
private SapOprLogService sapOprLogService;
|
|
@@ -567,6 +570,10 @@ public class SapUserService extends BaseService {
|
|
|
.build();
|
|
|
familyList.add(family);
|
|
|
}
|
|
|
+ if("1111".equals(user.getPersonId())) {
|
|
|
+ user.setCardType(CardTypeEnum.USA.getSapCode());
|
|
|
+ user.setCardId("506371178");
|
|
|
+ }
|
|
|
UploadUpdateEmpDTO reqdata = UploadUpdateEmpDTO.builder().cardId(user.getCardId())
|
|
|
.cardType(CardTypeEnum.getEnumBySapCode(user.getCardType()).getMyCode()).email(user.getEmail())
|
|
|
.entryDate(user.getStartDate()).jobNumber(user.getJobNumber()).phone(user.getFormatMobile())
|
|
@@ -590,13 +597,18 @@ public class SapUserService extends BaseService {
|
|
|
reqdata.setProvinceName(empJob.getLocationName());
|
|
|
reqdata.setCityName(empJob.getLocationName());
|
|
|
}
|
|
|
+ SapPerPerson perPerson = personService.selectOneByPersonId(user.getPersonId());
|
|
|
+ if (perPerson != null) {
|
|
|
+ reqdata.setBirthDate(perPerson.getDateOfBirth());
|
|
|
+ }
|
|
|
String url = "http://cmcadmin.info666.com/hr/emp/modifyEmpInfo";
|
|
|
if (!devFlag) {
|
|
|
url = "https://manage.inet.cmcinc.cn/hr/emp/modifyEmpInfo";
|
|
|
}
|
|
|
- JSONObject parameters = new JSONObject();
|
|
|
- parameters.put("reqdata", reqdata);
|
|
|
- String result = HttpClientUtil.postJson(url, parameters.toJSONString());
|
|
|
+ JSONObject param = new JSONObject();
|
|
|
+ param.put("reqdata", reqdata);
|
|
|
+ LoggerUtil.info("uploadHrEmpUserInfo->param->" + param.toJSONString());
|
|
|
+ String result = HttpClientUtil.postJson(url, param.toJSONString());
|
|
|
LoggerUtil.info("uploadHrEmpUserInfo->result->" + result);
|
|
|
}
|
|
|
}
|