|
@@ -1,56 +0,0 @@
|
|
|
-package com.nb.bus.utils;
|
|
|
|
|
-
|
|
|
|
|
-import cn.hutool.core.util.RandomUtil;
|
|
|
|
|
-import com.nb.bus.entity.BusDeviceRunningEntity;
|
|
|
|
|
-import com.nb.bus.enums.DeviceTypeEnum;
|
|
|
|
|
-
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
|
|
-import java.util.Date;
|
|
|
|
|
-
|
|
|
|
|
-/**
|
|
|
|
|
- * @author lifang
|
|
|
|
|
- * @version 1.0.0
|
|
|
|
|
- * @ClassName MockUtils.java
|
|
|
|
|
- * @Description TODO
|
|
|
|
|
- * @createTime 2022年05月05日 14:29:00
|
|
|
|
|
- */
|
|
|
|
|
-public class MockUtils {
|
|
|
|
|
- public static BusDeviceRunningEntity mock(String deviceId,String patientCode,String classify,DeviceTypeEnum type){
|
|
|
|
|
- BusDeviceRunningEntity pump = new BusDeviceRunningEntity();
|
|
|
|
|
- pump.setType(type);
|
|
|
|
|
- pump.setClassification(classify);
|
|
|
|
|
- pump.setDeviceId(deviceId);
|
|
|
|
|
- pump.setPatientCode(patientCode);
|
|
|
|
|
- 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.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());
|
|
|
|
|
-
|
|
|
|
|
- return pump;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|