|
|
|
@ -2,19 +2,20 @@ package com.docus.server.common;
|
|
|
|
|
|
|
|
|
|
import com.docus.core.util.DateUtil;
|
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
|
import com.docus.core.util.ListUtils;
|
|
|
|
|
import com.docus.core.util.json.JSON;
|
|
|
|
|
import com.docus.server.api.taskdistribute.TaskDistributeApi;
|
|
|
|
|
import com.docus.server.common.netty.CommMsg;
|
|
|
|
|
import com.docus.server.common.netty.server.ChannelRepository;
|
|
|
|
|
import com.docus.server.convert.CommMsgConvert;
|
|
|
|
|
import com.docus.server.dto.scheduling.management.schcollector.task.ReportDownTwoDTO;
|
|
|
|
|
import com.docus.server.dto.scheduling.management.schcollector.task.ReportTaskTwoDTO;
|
|
|
|
|
import com.docus.server.dto.scheduling.management.schterminator.CommMsgDTO;
|
|
|
|
|
import com.docus.server.dto.scheduling.management.schcollector.task.SchCollectorTaskDTO;
|
|
|
|
|
import com.docus.server.dto.scheduling.management.schterminator.NettyTerminatorDTO;
|
|
|
|
|
import com.docus.server.entity.scheduling.management.SchCollectRecord;
|
|
|
|
|
import com.docus.server.enums.BusyStateEnum;
|
|
|
|
|
import com.docus.server.enums.RetryTaskEnum;
|
|
|
|
|
import com.docus.server.service.ISchCollectRecordService;
|
|
|
|
|
import com.docus.server.service.ISchTerminatorService;
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
|
|
import com.google.common.collect.Maps;
|
|
|
|
|
import io.netty.buffer.Unpooled;
|
|
|
|
|
import io.netty.channel.Channel;
|
|
|
|
|
import io.netty.util.CharsetUtil;
|
|
|
|
@ -24,10 +25,8 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
@Component
|
|
|
|
|
@Slf4j
|
|
|
|
@ -36,6 +35,10 @@ public class SchedulerTask {
|
|
|
|
|
private ChannelRepository channelRepository;
|
|
|
|
|
@Resource
|
|
|
|
|
private TaskDistributeApi taskDistributeApi;
|
|
|
|
|
@Resource
|
|
|
|
|
private ISchCollectRecordService iSchCollectRecordService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ISchTerminatorService iSchTerminatorService;
|
|
|
|
|
|
|
|
|
|
//定时任务
|
|
|
|
|
// 5 * * * * ? 在每分钟的5秒执行
|
|
|
|
@ -52,44 +55,29 @@ public class SchedulerTask {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<ReportDownTwoDTO> reportDownTwoDTOList;
|
|
|
|
|
|
|
|
|
|
List<List<ReportTaskTwoDTO>> taskInfos = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
Map<String, ReportDownTwoDTO> reportDownTwoMap = Maps.newConcurrentMap();
|
|
|
|
|
if (!CollectionUtils.isEmpty(terminalList)) {
|
|
|
|
|
//:todo 任务平台需要修改发布任务策略
|
|
|
|
|
reportDownTwoDTOList = getTask(terminalList.size());
|
|
|
|
|
|
|
|
|
|
if (Func.isEmpty(reportDownTwoDTOList) || Func.isBlank(reportDownTwoDTOList.get(0).getPatientId())) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
reportDownTwoMap = ListUtils.toMap(reportDownTwoDTOList, ReportDownTwoDTO::getPatientId);
|
|
|
|
|
|
|
|
|
|
taskInfos = ListUtils.select(reportDownTwoDTOList, ReportDownTwoDTO::getTasks);
|
|
|
|
|
//:todo 任务平台需要修改发布任务策略
|
|
|
|
|
List<ReportDownTwoDTO> reportDownTwoDTOList = getTask(terminalList.size());
|
|
|
|
|
|
|
|
|
|
if (Func.isEmpty(reportDownTwoDTOList) || Func.isBlank(reportDownTwoDTOList.get(0).getPatientId())) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//只采集,有优先级的
|
|
|
|
|
for (NettyTerminatorDTO terminal : terminalList) {
|
|
|
|
|
for (List<ReportTaskTwoDTO> taskInfo : taskInfos) {
|
|
|
|
|
for (ReportDownTwoDTO report : reportDownTwoDTOList) {
|
|
|
|
|
//先找出有只采集的任务。
|
|
|
|
|
ReportTaskTwoDTO reportTaskTwoDto = taskInfo.get(0);
|
|
|
|
|
if (terminal.getOnlyCollectorIds().contains(reportTaskTwoDto.getCollectorId())
|
|
|
|
|
ReportTaskTwoDTO reportTaskTwoDto = report.getTasks().get(0);
|
|
|
|
|
if (!CollectionUtils.isEmpty(terminal.getOnlyCollectorIds()) && terminal.getOnlyCollectorIds().contains(reportTaskTwoDto.getCollectorId())
|
|
|
|
|
&& BusyStateEnum.IDLE.equals(terminal.getBusyState())) {
|
|
|
|
|
//把这个任务派给这个终端,并且把这个终端设置成繁忙
|
|
|
|
|
if (terminal.getPriorityCollectorIds().contains(reportTaskTwoDto.getCollectorId())) {
|
|
|
|
|
if (!CollectionUtils.isEmpty(terminal.getPriorityCollectorIds()) && terminal.getPriorityCollectorIds().contains(reportTaskTwoDto.getCollectorId())) {
|
|
|
|
|
//把这个任务派给这个终端
|
|
|
|
|
terminal.setBusyState(BusyStateEnum.BUSY);
|
|
|
|
|
String patientId = reportTaskTwoDto.getPatientId();
|
|
|
|
|
if (reportDownTwoMap.containsKey(patientId)) {
|
|
|
|
|
ReportDownTwoDTO reportDownTwoDTO = reportDownTwoMap.get(patientId);
|
|
|
|
|
iSchTerminatorService.saveOrUpdate(terminal.getTerminatorIp(), terminal);
|
|
|
|
|
|
|
|
|
|
tcpToClient(terminal, reportDownTwoDTO);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
tcpToClient(terminal, report);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -101,18 +89,16 @@ public class SchedulerTask {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (List<ReportTaskTwoDTO> taskInfo : taskInfos) {
|
|
|
|
|
for (ReportDownTwoDTO report : reportDownTwoDTOList) {
|
|
|
|
|
//先找出有只采集的任务。
|
|
|
|
|
ReportTaskTwoDTO reportTaskTwoDto = taskInfo.get(0);
|
|
|
|
|
if (terminal.getOnlyCollectorIds().contains(reportTaskTwoDto.getCollectorId())
|
|
|
|
|
ReportTaskTwoDTO reportTaskTwoDto = report.getTasks().get(0);
|
|
|
|
|
if (!CollectionUtils.isEmpty(terminal.getOnlyCollectorIds()) && terminal.getOnlyCollectorIds().contains(reportTaskTwoDto.getCollectorId())
|
|
|
|
|
&& BusyStateEnum.IDLE.equals(terminal.getBusyState())) {
|
|
|
|
|
//把这个任务派给这个终端,并且把这个终端设置成繁忙
|
|
|
|
|
terminal.setBusyState(BusyStateEnum.BUSY);
|
|
|
|
|
String patientId = reportTaskTwoDto.getPatientId();
|
|
|
|
|
if (reportDownTwoMap.containsKey(patientId)) {
|
|
|
|
|
ReportDownTwoDTO reportDownTwoDTO = reportDownTwoMap.get(patientId);
|
|
|
|
|
tcpToClient(terminal, reportDownTwoDTO);
|
|
|
|
|
}
|
|
|
|
|
iSchTerminatorService.saveOrUpdate(terminal.getTerminatorIp(), terminal);
|
|
|
|
|
|
|
|
|
|
tcpToClient(terminal, report);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -127,18 +113,16 @@ public class SchedulerTask {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (List<ReportTaskTwoDTO> taskInfo : taskInfos) {
|
|
|
|
|
for (ReportDownTwoDTO report : reportDownTwoDTOList) {
|
|
|
|
|
//先找出有只采集的任务。
|
|
|
|
|
ReportTaskTwoDTO reportTaskTwoDto = taskInfo.get(0);
|
|
|
|
|
if (terminal.getPriorityCollectorIds().contains(reportTaskTwoDto.getCollectorId())
|
|
|
|
|
ReportTaskTwoDTO reportTaskTwoDto = report.getTasks().get(0);
|
|
|
|
|
if (!CollectionUtils.isEmpty(terminal.getPriorityCollectorIds()) && terminal.getPriorityCollectorIds().contains(reportTaskTwoDto.getCollectorId())
|
|
|
|
|
&& BusyStateEnum.IDLE.equals(terminal.getBusyState())) {
|
|
|
|
|
//把这个任务派给这个终端
|
|
|
|
|
terminal.setBusyState(BusyStateEnum.BUSY);
|
|
|
|
|
String patientId = reportTaskTwoDto.getPatientId();
|
|
|
|
|
if (reportDownTwoMap.containsKey(patientId)) {
|
|
|
|
|
ReportDownTwoDTO reportDownTwoDTO = reportDownTwoMap.get(patientId);
|
|
|
|
|
tcpToClient(terminal, reportDownTwoDTO);
|
|
|
|
|
}
|
|
|
|
|
iSchTerminatorService.saveOrUpdate(terminal.getTerminatorIp(), terminal);
|
|
|
|
|
|
|
|
|
|
tcpToClient(terminal, report);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -153,40 +137,69 @@ public class SchedulerTask {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (List<ReportTaskTwoDTO> taskInfo : taskInfos) {
|
|
|
|
|
for (ReportDownTwoDTO report : reportDownTwoDTOList) {
|
|
|
|
|
//先找出有只采集的任务。
|
|
|
|
|
//把这个任务派给这个终端
|
|
|
|
|
ReportTaskTwoDTO reportTaskTwoDto = taskInfo.get(0);
|
|
|
|
|
String collectorId = reportTaskTwoDto.getCollectorId();
|
|
|
|
|
ReportTaskTwoDTO reportTaskTwoDto = report.getTasks().get(0);
|
|
|
|
|
terminal.setBusyState(BusyStateEnum.BUSY);
|
|
|
|
|
String patientId = reportTaskTwoDto.getPatientId();
|
|
|
|
|
if (reportDownTwoMap.containsKey(patientId)) {
|
|
|
|
|
ReportDownTwoDTO reportDownTwoDTO = reportDownTwoMap.get(patientId);
|
|
|
|
|
tcpToClient(terminal, reportDownTwoDTO);
|
|
|
|
|
}
|
|
|
|
|
iSchTerminatorService.saveOrUpdate(terminal.getTerminatorIp(), terminal);
|
|
|
|
|
|
|
|
|
|
tcpToClient(terminal, report);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//只采集,空闲的。
|
|
|
|
|
//获取只采集的任务,并且进行分配。
|
|
|
|
|
for (NettyTerminatorDTO terminal : terminalList) {
|
|
|
|
|
//把刚才已经分配任务过的采集器排除
|
|
|
|
|
if (BusyStateEnum.BUSY.equals(terminal.getBusyState())) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<ReportDownTwoDTO> onlyTaskInfos = getOnlyTaskInfos(terminal.getOnlyCollectorIds());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(onlyTaskInfos) || Func.isBlank(onlyTaskInfos.get(0).getPatientId())) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (ReportDownTwoDTO report : onlyTaskInfos) {
|
|
|
|
|
//将这条任务分配这个这个终端
|
|
|
|
|
//下发
|
|
|
|
|
terminal.setBusyState(BusyStateEnum.BUSY);
|
|
|
|
|
iSchTerminatorService.saveOrUpdate(terminal.getTerminatorIp(), terminal);
|
|
|
|
|
|
|
|
|
|
tcpToClient(terminal, report);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
log.info("定时任务: 执行完毕");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
} catch (
|
|
|
|
|
Exception e) {
|
|
|
|
|
log.error("定时任务执行出错", e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void tcpToClient(NettyTerminatorDTO terminal, ReportDownTwoDTO messageContent) {
|
|
|
|
|
private void tcpToClient(NettyTerminatorDTO terminal, ReportDownTwoDTO reportDownTwoDTO) {
|
|
|
|
|
Channel channel = channelRepository.get(terminal.getTerminatorIp());
|
|
|
|
|
|
|
|
|
|
CommMsgDTO commMsgDTO = CommMsgDTO.builder()
|
|
|
|
|
.content(JSON.toJSON(messageContent))
|
|
|
|
|
.messageType(MsgConstants.SCH_DISTRIBUTE_TASKS)
|
|
|
|
|
.build();
|
|
|
|
|
SchCollectRecord schCollectRecord = iSchCollectRecordService.saveOrUpdateRecord(terminal, reportDownTwoDTO);
|
|
|
|
|
|
|
|
|
|
CommMsg commMsg = CommMsgConvert.INSTANCE.convertDO(commMsgDTO);
|
|
|
|
|
SchCollectorTaskDTO messageContent = new SchCollectorTaskDTO();
|
|
|
|
|
messageContent.setCollectorRecordId(schCollectRecord.getId());
|
|
|
|
|
messageContent.setIsRetry(String.valueOf(RetryTaskEnum.NO_RETRY_TASK.getValue()));
|
|
|
|
|
messageContent.setTaskInfo(reportDownTwoDTO);
|
|
|
|
|
|
|
|
|
|
commMsg.setMessageTime(DateUtil.formatDateTime(new Date()));
|
|
|
|
|
CommMsg commMsg = CommMsg.builder()
|
|
|
|
|
.messageType(MsgConstants.SCH_DISTRIBUTE_TASKS)
|
|
|
|
|
.messageTime(DateUtil.formatDateTime(new Date()))
|
|
|
|
|
.content(JSON.toJSON(messageContent))
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
//tcp 下发任务到终端
|
|
|
|
|
if (channel != null) {
|
|
|
|
|
channel.writeAndFlush(Unpooled.copiedBuffer(JSON.toJSON(commMsg), CharsetUtil.UTF_8));
|
|
|
|
|
}
|
|
|
|
@ -198,21 +211,171 @@ public class SchedulerTask {
|
|
|
|
|
|
|
|
|
|
//mock
|
|
|
|
|
|
|
|
|
|
ReportDownTwoDTO task = taskDistributeApi.getTask("1");
|
|
|
|
|
ReportDownTwoDTO task1 = taskDistributeApi.getTask("1");
|
|
|
|
|
|
|
|
|
|
return Lists.newArrayList(task, task1);
|
|
|
|
|
String collectorId1 = "{\n" +
|
|
|
|
|
" \"createTime\": \"2022-12-03 12:39:30\",\n" +
|
|
|
|
|
" \"hospitals\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"admissDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"admissId\": \"amid_999901\",\n" +
|
|
|
|
|
" \"admissTimes\": 1,\n" +
|
|
|
|
|
" \"disDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"disDeptName\": \"22222\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\"\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ],\n" +
|
|
|
|
|
" \"jzh\": \"jzh_999901\",\n" +
|
|
|
|
|
" \"patient\": {\n" +
|
|
|
|
|
" \"inpatientNo\": \"999901\",\n" +
|
|
|
|
|
" \"name\": \"ceshi\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\"\n" +
|
|
|
|
|
" },\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\",\n" +
|
|
|
|
|
" \"recordType\": \"1\",\n" +
|
|
|
|
|
" \"tasks\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"collectorId\": \"1\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\",\n" +
|
|
|
|
|
" \"taskId\": 834292710565826560\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ]\n" +
|
|
|
|
|
"}";
|
|
|
|
|
ReportDownTwoDTO reportDownTwoDTO1 = JSON.fromJSON(collectorId1, ReportDownTwoDTO.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String collectorId2 = "{\n" +
|
|
|
|
|
" \"createTime\": \"2022-12-03 12:39:30\",\n" +
|
|
|
|
|
" \"hospitals\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"admissDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"admissId\": \"amid_999901\",\n" +
|
|
|
|
|
" \"admissTimes\": 1,\n" +
|
|
|
|
|
" \"disDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"disDeptName\": \"22222\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\"\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ],\n" +
|
|
|
|
|
" \"jzh\": \"jzh_999901\",\n" +
|
|
|
|
|
" \"patient\": {\n" +
|
|
|
|
|
" \"inpatientNo\": \"999901\",\n" +
|
|
|
|
|
" \"name\": \"ceshi\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\"\n" +
|
|
|
|
|
" },\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\",\n" +
|
|
|
|
|
" \"recordType\": \"1\",\n" +
|
|
|
|
|
" \"tasks\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"collectorId\": \"2\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\",\n" +
|
|
|
|
|
" \"taskId\": 834292712465846272\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ]\n" +
|
|
|
|
|
"}";
|
|
|
|
|
ReportDownTwoDTO reportDownTwoDTO2 = JSON.fromJSON(collectorId2, ReportDownTwoDTO.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String collectorId3 = "{\n" +
|
|
|
|
|
" \"createTime\": \"2023-01-09 19:26:11\",\n" +
|
|
|
|
|
" \"hospitals\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"admissDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"admissId\": \"amid_297974\",\n" +
|
|
|
|
|
" \"admissTimes\": 21,\n" +
|
|
|
|
|
" \"disDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"disDeptName\": \"普外二科(甲乳胸烧伤整形)\",\n" +
|
|
|
|
|
" \"patientId\": \"772389719349678080\"\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ],\n" +
|
|
|
|
|
" \"jzh\": \"jzh_297974\",\n" +
|
|
|
|
|
" \"patient\": {\n" +
|
|
|
|
|
" \"inpatientNo\": \"297974\",\n" +
|
|
|
|
|
" \"name\": \"曾美英\",\n" +
|
|
|
|
|
" \"patientId\": \"772389719349678080\"\n" +
|
|
|
|
|
" },\n" +
|
|
|
|
|
" \"patientId\": \"772389719349678080\",\n" +
|
|
|
|
|
" \"recordType\": \"1\",\n" +
|
|
|
|
|
" \"tasks\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"collectorId\": \"3\",\n" +
|
|
|
|
|
" \"patientId\": \"772389719349678080\",\n" +
|
|
|
|
|
" \"taskId\": 838201379426750464\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ]\n" +
|
|
|
|
|
"}";
|
|
|
|
|
ReportDownTwoDTO reportDownTwoDTO3 = JSON.fromJSON(collectorId3, ReportDownTwoDTO.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Lists.newArrayList(reportDownTwoDTO1, reportDownTwoDTO2, reportDownTwoDTO3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//根据采集器id类型,一次获取一批采集器类型任务
|
|
|
|
|
private ArrayList<ReportDownTwoDTO> getTask(List<String> collectorIds) {
|
|
|
|
|
private List<ReportDownTwoDTO> getOnlyTaskInfos(List<String> collectorIds) {
|
|
|
|
|
// return taskDistributeApi.getTask(collectorIds.get(0));
|
|
|
|
|
|
|
|
|
|
//mock
|
|
|
|
|
ReportDownTwoDTO task = taskDistributeApi.getTask("4");
|
|
|
|
|
ReportDownTwoDTO task1 = taskDistributeApi.getTask("5");
|
|
|
|
|
|
|
|
|
|
return Lists.newArrayList(task, task1);
|
|
|
|
|
|
|
|
|
|
String collectorId2 = "{\n" +
|
|
|
|
|
" \"createTime\": \"2022-12-03 12:39:30\",\n" +
|
|
|
|
|
" \"hospitals\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"admissDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"admissId\": \"amid_999901\",\n" +
|
|
|
|
|
" \"admissTimes\": 1,\n" +
|
|
|
|
|
" \"disDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"disDeptName\": \"22222\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\"\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ],\n" +
|
|
|
|
|
" \"jzh\": \"jzh_999901\",\n" +
|
|
|
|
|
" \"patient\": {\n" +
|
|
|
|
|
" \"inpatientNo\": \"999901\",\n" +
|
|
|
|
|
" \"name\": \"ceshi\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\"\n" +
|
|
|
|
|
" },\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\",\n" +
|
|
|
|
|
" \"recordType\": \"1\",\n" +
|
|
|
|
|
" \"tasks\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"collectorId\": \"2\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\",\n" +
|
|
|
|
|
" \"taskId\": 834292712465846272\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ]\n" +
|
|
|
|
|
"}";
|
|
|
|
|
ReportDownTwoDTO reportDownTwoDTO2 = JSON.fromJSON(collectorId2, ReportDownTwoDTO.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String collectorId3 = "{\n" +
|
|
|
|
|
" \"createTime\": \"2022-12-03 12:39:30\",\n" +
|
|
|
|
|
" \"hospitals\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"admissDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"admissId\": \"amid_999901\",\n" +
|
|
|
|
|
" \"admissTimes\": 1,\n" +
|
|
|
|
|
" \"disDate\": \"2023-12-31 01:01:01\",\n" +
|
|
|
|
|
" \"disDeptName\": \"22222\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\"\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ],\n" +
|
|
|
|
|
" \"jzh\": \"jzh_999901\",\n" +
|
|
|
|
|
" \"patient\": {\n" +
|
|
|
|
|
" \"inpatientNo\": \"999901\",\n" +
|
|
|
|
|
" \"name\": \"ceshi\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\"\n" +
|
|
|
|
|
" },\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\",\n" +
|
|
|
|
|
" \"recordType\": \"1\",\n" +
|
|
|
|
|
" \"tasks\": [\n" +
|
|
|
|
|
" {\n" +
|
|
|
|
|
" \"collectorId\": \"3\",\n" +
|
|
|
|
|
" \"patientId\": \"758878610105573376\",\n" +
|
|
|
|
|
" \"taskId\": 834292883635392512\n" +
|
|
|
|
|
" }\n" +
|
|
|
|
|
" ]\n" +
|
|
|
|
|
"}";
|
|
|
|
|
ReportDownTwoDTO reportDownTwoDTO3 = JSON.fromJSON(collectorId3, ReportDownTwoDTO.class);
|
|
|
|
|
|
|
|
|
|
return Lists.newArrayList(reportDownTwoDTO2, reportDownTwoDTO3);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|