新疆需求整改
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
--重置专家排序
|
||||
update `con_doctor` set sort = 9999;
|
||||
+3
@@ -143,6 +143,7 @@ public class AnYanClientExecutor implements AnYanClient {
|
||||
if (ObjectUtil.isNotEmpty(authResult) && StrUtil.isNotEmpty(authResult.getAccess_token())) {
|
||||
int expireSeconds = ObjectUtil.isNotEmpty(authResult.getExpires_in()) ? authResult.getExpires_in() : 7200;
|
||||
redisClientUtil.set(new RedisKeyPrefix(expireSeconds, AnYanConstants.AN_YAN_API_TOKEN_PREFIX), "publicToken", authResult.getAccess_token());
|
||||
log.info("---------刷新安眼token成功-------新的token:{},剩余过期时间:{}",authResult.getAccess_token(),authResult.getExpires_in());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,12 +371,14 @@ public class AnYanClientExecutor implements AnYanClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Retryable(maxAttempts = 2)
|
||||
public AnYanEmpHealthCheckNew queryEmpHealthCheckNew(String id) {
|
||||
AnYanResult<Object> result = RestTemplateUtil.getExchange(AnYanApiEnum.CHECK_NEW_BY_ID, buildTokenHeader(), id);
|
||||
return BeanUtil.toBean(result.getData(), AnYanEmpHealthCheckNew.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Retryable(maxAttempts = 2)
|
||||
public List<HealthCheckProject> queryHealthCheckProject(AnYanHealthCheckProjectParam param) {
|
||||
AnYanResult<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.HEALTH_CHECK_PROJECT, buildTokenHeader(), param);
|
||||
List<Object> listMaps = (List<Object>) result.getData();
|
||||
|
||||
+1
@@ -59,6 +59,7 @@ public class AnYanRestTemplateConfig {
|
||||
execute = clientHttpRequestExecution.execute(httpRequest, bytes);
|
||||
HttpStatus httpStatus = execute.getStatusCode();
|
||||
if (Arrays.asList(HttpStatus.UNAUTHORIZED, HttpStatus.FORBIDDEN).contains(httpStatus)) {
|
||||
log.info("---------安眼token过期,触发刷新token机制-------已过期的token:{}",httpRequest.getHeaders().getFirst("authorization"));
|
||||
SpringContextUtils.getBean("anYanClientExecutor", AnYanClient.class).refreshToken();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
+15
-16
@@ -15,9 +15,11 @@ import com.renkang.consultation.vo.ConDoctorVO;
|
||||
import com.renkang.consultation.vo.ConHelperCustomUserVO;
|
||||
import com.renkang.emergency.entity.EmergencyCenterResource;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.modules.manager.SysCacheImpl;
|
||||
import org.jeecg.modules.system.entity.SysDepart;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -26,22 +28,17 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(RequestPrefix.screen)
|
||||
@RequiredArgsConstructor
|
||||
public class ConScreenApiController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private IConDoctorService conDoctorService;
|
||||
@Autowired
|
||||
private IConSessionService conSessionService;
|
||||
@Autowired
|
||||
private SysCacheImpl sysCache;
|
||||
private final IConDoctorService conDoctorService;
|
||||
private final IConSessionService conSessionService;
|
||||
private final SysCacheImpl sysCache;
|
||||
private final ISysBaseAPI sysBaseAPI;
|
||||
|
||||
@Operation(summary = "查询统计数", description = "查询统计数")
|
||||
@GetMapping("/queryStaticCount")
|
||||
@@ -108,16 +105,18 @@ public class ConScreenApiController {
|
||||
@GetMapping("/queryDeptCountStat")
|
||||
public Result<?> queryDeptCountStat() {
|
||||
List<Map<String, Object>> mapList = conDoctorService.getDeptCountStatList();
|
||||
//翻译部门名称之前循环查缓存20251225修改, 线上出现存在的部门未翻译成功的问题
|
||||
Set<String> orgCodes = mapList.stream().map(map -> map.get("orgCode").toString()).collect(Collectors.toSet());
|
||||
Map<String,String> orgCodeForName = sysBaseAPI.queryDepartNameByOrgCodes(orgCodes);
|
||||
if(!CollectionUtils.isEmpty(mapList)){
|
||||
for (Map<String, Object> map : mapList) {
|
||||
SysDepart depart = sysCache.getDepartByOrgCode(map.get("orgCode").toString());
|
||||
if(depart != null){
|
||||
map.put("departName", depart.getDepartName());
|
||||
}
|
||||
String orgName = orgCodeForName.get(map.get("orgCode").toString());
|
||||
map.put("departName", null != orgName ? orgName : "未知");
|
||||
}
|
||||
}
|
||||
return Result.OK(mapList);
|
||||
}
|
||||
|
||||
@Operation(summary = "科室咨询数量统计", description = "科室咨询数量统计")
|
||||
@GetMapping("/queryDepartmentCountStat")
|
||||
public Result<?> queryDepartmentCountStat() {
|
||||
|
||||
Reference in New Issue
Block a user