【安眼】用户信息同步

This commit is contained in:
2025-12-02 17:11:00 +08:00
parent cd6d48c22e
commit 23b560ca01
4 changed files with 177 additions and 12 deletions
@@ -34,10 +34,7 @@ import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.HttpClientErrorException;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -342,14 +339,18 @@ public class AnYanClientExecutor implements AnYanClient {
@Override
public List<AnYanUpdateUserBatchInfo> updateUserBatch(List<String> employeeNumList) {
AnYanResult<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.QUERY_EMPLOYEE_CARE_PERSON, buildTokenHeader(), employeeNumList);
Map<String,List<String>> map = new HashMap<>(1);
map.put("employeeNumList",employeeNumList);
AnYanResult<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.FIND_VITAL_INFO, buildTokenHeader(), map);
List<Object> listMaps = (List<Object>) result.getData();
return listMaps.stream().map(lMap -> BeanUtil.toBean(lMap, AnYanUpdateUserBatchInfo.class)).collect(Collectors.toList());
}
@Override
public AnYanUserEmployee updateEmployeeNum(String employeeNum) {
AnYanResult<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.FIND_BY_EMPLOYEENUM, buildTokenHeader(), employeeNum);
Map<String,String> map = new HashMap<>(1);
map.put("employeeNum",employeeNum);
AnYanResult<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.FIND_BY_EMPLOYEENUM, buildTokenHeader(), map);
return BeanUtil.toBean(result.getData(), AnYanUserEmployee.class);
}
@@ -94,27 +94,27 @@ public enum AnYanApiEnum {
/**
* 17.一人一案分页列表接口 (用大屏首页重点关爱趋势二级弹窗列表)
*/
CARE_PERSON_PAGE_LIST("aygc-znhpt-sys/0/api/empPersonFile/findPage", "", HttpMethod.POST),
CARE_PERSON_PAGE_LIST("/aygc-znhpt-sys/0/api/empPersonFile/findPage", "", HttpMethod.POST),
/**
* 18.查询关爱联络员信息及急救人员查询接口
*/
QUERY_EMPLOYEE_CARE_PERSON("aygc-znhpt-sys/0/api/empCareEmp/findPageByIdNo", "", HttpMethod.POST),
QUERY_EMPLOYEE_CARE_PERSON("/aygc-znhpt-sys/0/api/empCareEmp/findPageByIdNo", "", HttpMethod.POST),
/**
* 19.批量更新员工关键信息接口
*/
FIND_VITAL_INFO("aygc-znhpt-sys/0/api/empBasicInfo/find-vital-info","", HttpMethod.POST),
FIND_VITAL_INFO("/aygc-znhpt-sys/0/api/empBasicInfo/find-vital-info","", HttpMethod.POST),
/**
* 20.更新单个员工扩展信息
*/
FIND_BY_EMPLOYEENUM("aygc-znhpt-sys/0/api/empBasicInfo/find-by-employeeNum","", HttpMethod.POST),
FIND_BY_EMPLOYEENUM("/aygc-znhpt-sys/0/api/empBasicInfo/find-by-employeeNum","", HttpMethod.POST),
/**
* 22.体检数据
*/
HEALTH_CHECK_NEW("aygc-znhpt-sys/0/api/empHealthCheckNew/findPage","",HttpMethod.POST);
HEALTH_CHECK_NEW("/aygc-znhpt-sys/0/api/empHealthCheckNew/findPage","",HttpMethod.POST);
/**
* 接口路径