|
@@ -467,63 +467,154 @@ public class DeviceInfoListener {
|
|
|
pump.setClassification(String.valueOf(mark));
|
|
pump.setClassification(String.valueOf(mark));
|
|
|
pump.setDeviceId("123");
|
|
pump.setDeviceId("123");
|
|
|
pump.setPatientCode("456");
|
|
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.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
pump.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
pump.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
- pump.setSelfControlLockTime(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
|
|
+ pump.setSelfControlLockTime(RandomUtil.randomInt(100));
|
|
|
pump.setPcaValidCount(RandomUtil.randomInt(100));
|
|
pump.setPcaValidCount(RandomUtil.randomInt(100));
|
|
|
pump.setPcaInvalidCount(RandomUtil.randomInt(100));
|
|
pump.setPcaInvalidCount(RandomUtil.randomInt(100));
|
|
|
- pump.setPcaTotalCount(RandomUtil.randomInt(100));
|
|
|
|
|
|
|
+ pump.setPcaTotalCount(pump.getPcaInvalidCount()+pump.getPcaValidCount());
|
|
|
|
|
+ pump.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
+
|
|
|
|
|
+ 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()));
|
|
SpringUtil.publishEvent(new DeviceInfoEvent(this,pump,pump.getDeviceId()));
|
|
|
|
|
|
|
|
Thread.sleep(5000);
|
|
Thread.sleep(5000);
|
|
|
-//
|
|
|
|
|
-// BusDeviceRunningEntity pump1 = new BusDeviceRunningEntity();
|
|
|
|
|
-// pump1.setDeviceId("456");
|
|
|
|
|
-// pump1.setType(DeviceEnum.continuous);
|
|
|
|
|
-// pump1.setClassification(String.valueOf(mark));
|
|
|
|
|
-// pump1.setPatientCode("456");
|
|
|
|
|
-// pump1.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-// pump1.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-// pump1.setSelfControlLockTime(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-// pump1.setPcaValidCount(RandomUtil.randomInt(100));
|
|
|
|
|
-// pump1.setPcaInvalidCount(RandomUtil.randomInt(100));
|
|
|
|
|
-// pump1.setPcaTotalCount(RandomUtil.randomInt(100));
|
|
|
|
|
-// SpringUtil.publishEvent(new DeviceInfoEvent(this,pump1,pump1.getDeviceId()));
|
|
|
|
|
-//
|
|
|
|
|
-// Thread.sleep(5000);
|
|
|
|
|
-//
|
|
|
|
|
-// BusDeviceRunningEntity pump2 = new BusDeviceRunningEntity();
|
|
|
|
|
-// pump2.setType(DeviceEnum.continuous);
|
|
|
|
|
-// pump2.setDeviceId("456");
|
|
|
|
|
-// pump2.setClassification(String.valueOf(mark));
|
|
|
|
|
-// pump2.setPatientCode("789");
|
|
|
|
|
-// pump2.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-// pump2.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-// pump2.setSelfControlLockTime(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-// pump2.setPcaValidCount(RandomUtil.randomInt(100));
|
|
|
|
|
-// pump2.setPcaInvalidCount(RandomUtil.randomInt(100));
|
|
|
|
|
-// pump2.setPcaTotalCount(RandomUtil.randomInt(100));
|
|
|
|
|
-// pump2.setAlarm(DeviceAlarmEnum.Bubble);
|
|
|
|
|
-// 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(DeviceEnum.continuous);
|
|
|
|
|
-// pump3.setPatientCode("456");
|
|
|
|
|
-// pump3.setRemainDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-// pump3.setContinueDose(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-// pump3.setSelfControlLockTime(BigDecimal.valueOf(RandomUtil.randomInt(100)));
|
|
|
|
|
-// pump3.setPcaValidCount(RandomUtil.randomInt(100));
|
|
|
|
|
-// pump3.setPcaInvalidCount(RandomUtil.randomInt(100));
|
|
|
|
|
-// pump3.setPcaTotalCount(RandomUtil.randomInt(100));
|
|
|
|
|
-// SpringUtil.publishEvent(new DeviceInfoEvent(this,pump3,pump3.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());
|
|
|
|
|
+ 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());
|
|
|
|
|
+
|
|
|
|
|
+ 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();
|
|
String now = DateUtil.yesterday().toString();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
BusClinicEntity clinic = new BusClinicEntity();
|
|
BusClinicEntity clinic = new BusClinicEntity();
|
|
|
clinic.setPatientCode("456");
|
|
clinic.setPatientCode("456");
|
|
|
clinic.setName("临床:"+ now);
|
|
clinic.setName("临床:"+ now);
|