|
|
@@ -26,6 +26,7 @@ import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Optional;
|
|
|
@@ -123,6 +124,8 @@ public class NetEasyService {
|
|
|
//初始密码拼音+系统账号+SI
|
|
|
initPWD = initAccount+employee.getEm_code()+"SI";
|
|
|
q.addParam("password", initAccount+employee.getEm_code()+"SI");
|
|
|
+ }else{
|
|
|
+ q.addParam("password", initPWD);
|
|
|
}
|
|
|
if(StringUtil.hasText(employee.getEm_mobile())){
|
|
|
q.addParam("mobile", employee.getEm_mobile());
|
|
|
@@ -140,6 +143,8 @@ public class NetEasyService {
|
|
|
"您也可以通过UAS系统首页-->右上角 网易邮箱 进行SSO免密登录。',em_qywx" +
|
|
|
" from employee where em_code='"+employee.getEm_code()+"' and em_qywx is not null");
|
|
|
logger.info("创建账号成功,账号名称:{}",employee.getEm_name());
|
|
|
+ }else {
|
|
|
+ logger.info("创建账号失败,账号名称:{},错误信息:{}",employee.getEm_name(),r.getMessage());
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
@@ -248,14 +253,17 @@ public class NetEasyService {
|
|
|
初始化人员资料
|
|
|
*/
|
|
|
public void initEmployee(){
|
|
|
- /*List<AccountResp> userList = new ArrayList<AccountResp>();
|
|
|
+ List<AccountResp> userList = new ArrayList<AccountResp>();
|
|
|
getNetEasyUserList(1, userList);
|
|
|
List<Employee> employeeList = uasSyncService.getNetEasyUserList();
|
|
|
for (AccountResp accountResp : userList) {
|
|
|
- Optional<Employee> employeeOptional = employeeList.stream().filter(employee -> employee.getEm_name().equals(accountResp.getName())).findFirst();
|
|
|
- employeeOptional.ifPresent(employee -> baseDao.updateByCondition("employee", "em_neteasyid='" + accountResp.getAccountName() + "'", "em_code='" + employee.getEm_code() + "'"));
|
|
|
- }*/
|
|
|
- List<Employee> employeeList = uasSyncService.getNetEasyUserList();
|
|
|
+ if (accountResp.getName().contains("曾泽华") || accountResp.getName().contains("师盼博")) {
|
|
|
+ logger.info("账号信息:{}",accountResp.toString());
|
|
|
+ }
|
|
|
+ //Optional<Employee> employeeOptional = employeeList.stream().filter(employee -> employee.getEm_name().equals(accountResp.getName())).findFirst();
|
|
|
+ //employeeOptional.ifPresent(employee -> baseDao.updateByCondition("employee", "em_neteasyid='" + accountResp.getAccountName() + "'", "em_code='" + employee.getEm_code() + "'"));
|
|
|
+ }
|
|
|
+ /* List<Employee> employeeList = uasSyncService.getNetEasyUserList();
|
|
|
for (Employee employee : employeeList) {
|
|
|
if( StringUtil.hasText(employee.getEm_neteasyid())) {
|
|
|
updateNetEasyEmployee(employee);
|
|
|
@@ -268,7 +276,7 @@ public class NetEasyService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
/**
|