|
@@ -466,186 +466,6 @@ public class DeviceInfoListener {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public static int count=1;
|
|
|
|
|
- public static long mark=System.currentTimeMillis();
|
|
|
|
|
-// @Scheduled(cron = "0/10 * * * * ?")
|
|
|
|
|
- public void send() throws InterruptedException {
|
|
|
|
|
-// List<BusDeviceRunningEntity> list = deviceUsingService.list();
|
|
|
|
|
-// list.forEach(pump->{
|
|
|
|
|
- while (count>1){
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- ++count;
|
|
|
|
|
- BusDeviceRunningEntity pump = new BusDeviceRunningEntity();
|
|
|
|
|
- pump.setType(DeviceTypeEnum.intelligent);
|
|
|
|
|
- pump.setClassification(String.valueOf(mark));
|
|
|
|
|
- pump.setDeviceId("123");
|
|
|
|
|
- pump.setPatientCode("456");
|
|
|
|
|
- pump.setTotalDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setFirstDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setInputDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setAppendDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setAppendLockTime(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setMaxDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setSelfControlCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setSelfControlLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setFirstDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setSelfControlLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setPcaValidCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setPcaInvalidCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setPcaTotalCount(pump.getPcaInvalidCount()+pump.getPcaValidCount());
|
|
|
|
|
- pump.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-
|
|
|
|
|
- pump.setAlarm(DeviceAlarmEnum.Bubble);
|
|
|
|
|
- pump.setPulseDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setPulseLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setPulseFirstLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump.setFlowAdjustRate(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setFlowCount(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setFlowDownCycle(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setFlowDownLimit(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setFlowUpCycle(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump.setFlowUpLimit(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-
|
|
|
|
|
- pump.setUploadTime(new Date());
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- SpringUtil.publishEvent(new DeviceInfoEvent(this,pump,pump.getDeviceId()));
|
|
|
|
|
-
|
|
|
|
|
- Thread.sleep(5000);
|
|
|
|
|
-
|
|
|
|
|
- BusDeviceRunningEntity pump1 = new BusDeviceRunningEntity();
|
|
|
|
|
- pump1.setDeviceId("456");
|
|
|
|
|
- pump1.setType(DeviceTypeEnum.continuous);
|
|
|
|
|
- pump1.setClassification(String.valueOf(mark));
|
|
|
|
|
- pump1.setPatientCode("456");
|
|
|
|
|
- pump1.setTotalDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setFirstDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setInputDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setAppendDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setAppendLockTime(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setMaxDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setSelfControlCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setSelfControlLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setFirstDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setSelfControlLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setPcaValidCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setPcaInvalidCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setPcaTotalCount(pump.getPcaInvalidCount()+pump.getPcaValidCount());
|
|
|
|
|
- pump1.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- pump1.setPulseDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setPulseLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setPulseFirstLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump1.setFlowAdjustRate(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setFlowCount(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setFlowDownCycle(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setFlowDownLimit(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setFlowUpCycle(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump1.setFlowUpLimit(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-
|
|
|
|
|
- pump1.setUploadTime(new Date());
|
|
|
|
|
- SpringUtil.publishEvent(new DeviceInfoEvent(this,pump1,pump1.getDeviceId()));
|
|
|
|
|
- Thread.sleep(5000);
|
|
|
|
|
-
|
|
|
|
|
- BusDeviceRunningEntity pump2 = new BusDeviceRunningEntity();
|
|
|
|
|
- pump2.setType(DeviceTypeEnum.continuous);
|
|
|
|
|
- pump2.setDeviceId("456");
|
|
|
|
|
- pump2.setClassification(String.valueOf(mark));
|
|
|
|
|
- pump2.setPatientCode("789");
|
|
|
|
|
- pump2.setTotalDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setFirstDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setInputDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setAppendDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setAppendLockTime(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setMaxDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setSelfControlCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setSelfControlLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setFirstDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setSelfControlLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setPcaValidCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setPcaInvalidCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setPcaTotalCount(pump.getPcaInvalidCount()+pump.getPcaValidCount());
|
|
|
|
|
- pump2.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-
|
|
|
|
|
- pump2.setPulseDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setPulseLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setPulseFirstLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump2.setFlowAdjustRate(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setFlowCount(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setFlowDownCycle(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setFlowDownLimit(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setFlowUpCycle(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump2.setFlowUpLimit(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-
|
|
|
|
|
- pump2.setUploadTime(new Date());
|
|
|
|
|
- SpringUtil.publishEvent(new DeviceInfoEvent(this,pump2,pump2.getDeviceId()));
|
|
|
|
|
- Thread.sleep(5000);
|
|
|
|
|
-
|
|
|
|
|
- BusDeviceRunningEntity pump3 = new BusDeviceRunningEntity();
|
|
|
|
|
- pump3.setDeviceId("456");
|
|
|
|
|
- pump3.setClassification(String.valueOf(mark));
|
|
|
|
|
- pump3.setType(DeviceTypeEnum.continuous);
|
|
|
|
|
- pump3.setPatientCode("456");
|
|
|
|
|
- pump3.setTotalDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setFirstDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setInputDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setAppendDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setAppendLockTime(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setMaxDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setSelfControlCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setSelfControlLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setFirstDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setSelfControlLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setPcaValidCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setPcaInvalidCount(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setPcaTotalCount(pump.getPcaInvalidCount()+pump.getPcaValidCount());
|
|
|
|
|
- pump3.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-
|
|
|
|
|
- pump3.setPulseDose(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setPulseLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setPulseFirstLockTime(RandomUtil.randomInt(100));
|
|
|
|
|
- pump3.setFlowAdjustRate(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setFlowCount(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setFlowDownCycle(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setFlowDownLimit(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setFlowUpCycle(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
- pump3.setFlowUpLimit(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-
|
|
|
|
|
- pump3.setUploadTime(new Date());
|
|
|
|
|
- SpringUtil.publishEvent(new DeviceInfoEvent(this,pump3,pump3.getDeviceId()));
|
|
|
|
|
-
|
|
|
|
|
- Thread.sleep(5000);
|
|
|
|
|
- String now = DateUtil.yesterday().toString();
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-// BusClinicEntity clinic = new BusClinicEntity();
|
|
|
|
|
-// clinic.setPatientCode("456");
|
|
|
|
|
-// clinic.setName("临床:"+ now);
|
|
|
|
|
-// clinic.setPatientName("病号:"+now);
|
|
|
|
|
-// clinic.setPatientGender(SexEnum.MAN);
|
|
|
|
|
-// clinic.setPatientAge(12);
|
|
|
|
|
-// clinic.setWard("病区:"+now);
|
|
|
|
|
-// clinic.setBedNo("床号:"+now);
|
|
|
|
|
-// clinic.setTenantId("1505808170691784706");
|
|
|
|
|
-// clinic.setStartTime(DateUtil.date(1651116958000L));
|
|
|
|
|
-// SpringUtil.publishEvent(new HisEvent(this,Arrays.asList(clinic),clinic.getTenantId()));
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
|
DeviceAlarmEnum[] enumConstants = DeviceAlarmEnum.class.getEnumConstants();
|
|
DeviceAlarmEnum[] enumConstants = DeviceAlarmEnum.class.getEnumConstants();
|
|
|
for (DeviceAlarmEnum enumConstant : enumConstants) {
|
|
for (DeviceAlarmEnum enumConstant : enumConstants) {
|