安眼接口对接
This commit is contained in:
+3
-3
@@ -68,10 +68,10 @@ public class Resource implements Serializable {
|
||||
@Schema(title = "纬度")
|
||||
private BigDecimal latitude;
|
||||
/**
|
||||
* 资源类型(1:油田医院 2:合作医院 3:医疗点 4: )
|
||||
* 资源类型(1:油田医院 3:健康小屋 5:救护车) 202508xj 项目字典发生变化 , 使用字典resource_type ,
|
||||
*/
|
||||
@Excel(name = "资源类型(1:油田医院 2:合作医院 3:医疗点 4: )", width = 15)
|
||||
@Schema(title = "资源类型(1:油田医院 2:合作医院 3:医疗点 4: )")
|
||||
@Excel(name = "资源类型(1:油田医院 3:健康小屋 5:救护车)", width = 15)
|
||||
@Schema(title = "资源类型(1:油田医院 3:健康小屋 5:救护车 )")
|
||||
private String type;
|
||||
/**
|
||||
* 救治范围
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ import java.util.List;
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class LargeScreenNewController {
|
||||
|
||||
private final ITbUserHelpMacService tbUserHelpMacService;
|
||||
private final YcLargeScreenService ycLargeScreenService;
|
||||
private final ITblAmbulanceGpsService tblAmbulanceGpsService;
|
||||
|
||||
+5
@@ -38,4 +38,9 @@ public interface ILargeScreenService extends IService<LargeScreenMap> {
|
||||
List<HospitalVO> hospital();
|
||||
|
||||
void runJob();
|
||||
|
||||
/**
|
||||
* 同步安眼系统中的油田医院数据和监控小屋数据定时任务
|
||||
*/
|
||||
void syncAnYanHospital();
|
||||
}
|
||||
|
||||
+10
@@ -26,11 +26,13 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.jeecg.common.api.dto.ServiceFakerData;
|
||||
import org.jeecg.common.api.dto.YcMedicalCenterFakerData;
|
||||
import org.jeecg.common.constant.FakerDataConstant;
|
||||
import org.jeecg.common.exception.ExceptionAssertsUtil;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.util.RedisClientUtil;
|
||||
import org.jeecg.util.RedisKeyPrefix;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
@@ -455,6 +457,7 @@ public class LargeScreenServiceImpl extends ServiceImpl<LargeScreenMapper, Large
|
||||
|
||||
@Override
|
||||
public void runJob(){
|
||||
|
||||
// 体检人数统计查询
|
||||
List<MedicalPeopleNumStatisticsVO> medicalPeopleNumStatisticsList = new ArrayList<>();
|
||||
redisClientUtil.set(MEDICAL,MEDICAL_PEOPLE_NUM_STATISTICS,medicalPeopleNumStatisticsList);
|
||||
@@ -483,6 +486,13 @@ public class LargeScreenServiceImpl extends ServiceImpl<LargeScreenMapper, Large
|
||||
redisClientUtil.set(MEDICAL,HEALTH_SIGN,healthSign);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void syncAnYanHospital() {
|
||||
//更新医院信息
|
||||
//更新健康小屋信息
|
||||
}
|
||||
|
||||
public static String[] generateRandomLocation() {
|
||||
Random random = new Random();
|
||||
|
||||
|
||||
+16
@@ -1,6 +1,8 @@
|
||||
package com.renkang.emergency.largeScreen.task;
|
||||
|
||||
import com.renkang.emergency.largeScreen.service.ILargeScreenService;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -16,4 +18,18 @@ public class LargeScreenJob {
|
||||
largeScreenService.runJob();
|
||||
log.info("========结束缓存大屏数据========");
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步安眼系统中的油田医院数据和监控小屋数据定时任务 ,回写至emergency_resource表
|
||||
* @return 执行状态
|
||||
*/
|
||||
@XxlJob(value = "syncAnYanHospital")
|
||||
public ReturnT<String> syncAnYanHospital() {
|
||||
try {
|
||||
largeScreenService.syncAnYanHospital();
|
||||
return ReturnT.SUCCESS;
|
||||
} catch (Exception e) {
|
||||
return ReturnT.FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user