A17404李放 3 éve
szülő
commit
75704050ea
21 módosított fájl, 231 hozzáadás és 71 törlés
  1. 2 2
      coffee-common/src/main/java/com/coffee/common/config/websocket/DefaultMessageListener.java
  2. 2 2
      coffee-system/src/main/java/com/coffee/bus/controller/BusAlarmController.java
  3. 17 14
      coffee-system/src/main/java/com/coffee/bus/controller/BusClinicController.java
  4. 17 0
      coffee-system/src/main/java/com/coffee/bus/controller/BusDeviceHistoryController.java
  5. 18 2
      coffee-system/src/main/java/com/coffee/bus/controller/BusEvaluationController.java
  6. 10 16
      coffee-system/src/main/java/com/coffee/bus/controller/BusPatientController.java
  7. 4 1
      coffee-system/src/main/java/com/coffee/bus/entity/BusEvaluationEntity.java
  8. 8 0
      coffee-system/src/main/java/com/coffee/bus/mapper/BusDeviceHistoryMapper.java
  9. 5 0
      coffee-system/src/main/java/com/coffee/bus/mapper/BusEvaluationMapper.java
  10. 1 1
      coffee-system/src/main/java/com/coffee/bus/service/LocalBusDeviceAlarmService.java
  11. 9 0
      coffee-system/src/main/java/com/coffee/bus/service/LocalBusDeviceHistoryService.java
  12. 7 0
      coffee-system/src/main/java/com/coffee/bus/service/LocalBusEvaluationService.java
  13. 35 0
      coffee-system/src/main/java/com/coffee/bus/service/dto/ClinicAnalRecordResult.java
  14. 31 0
      coffee-system/src/main/java/com/coffee/bus/service/dto/DeviceHistoryQuery.java
  15. 31 0
      coffee-system/src/main/java/com/coffee/bus/service/dto/EvalQuery.java
  16. 3 0
      coffee-system/src/main/java/com/coffee/bus/service/dto/PatientMonitorResult.java
  17. 1 1
      coffee-system/src/main/resources/mapper/bus/BusDeviceAlarmMapper.xml
  18. 14 0
      coffee-system/src/main/resources/mapper/bus/BusDeviceHistoryMapper.xml
  19. 14 0
      coffee-system/src/main/resources/mapper/bus/BusEvaluationMapper.xml
  20. 2 0
      coffee-system/src/main/resources/mapper/bus/BusPatientMapper.xml
  21. 0 32
      pom.xml

+ 2 - 2
coffee-common/src/main/java/com/coffee/common/config/websocket/DefaultMessageListener.java

@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
 import com.coffee.common.cache.value.Value;
-import com.coffee.common.config.websocket.handler.Subscribe;
 import com.coffee.common.config.websocket.handler.TopicWrapper;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -15,6 +14,7 @@ import org.springframework.data.redis.connection.MessageListener;
 import org.tio.core.ChannelContext;
 import org.tio.core.Tio;
 import org.tio.core.utils.TioUtils;
+import org.tio.websocket.common.WsPacket;
 import org.tio.websocket.common.WsResponse;
 
 import java.util.HashSet;
@@ -49,7 +49,7 @@ public class DefaultMessageListener implements MessageListener {
                             JSONObject jsonObject = JSONUtil.parseObj(message.toString());
                             json = objectMapper.writeValueAsString(MessageResponse.of(id, "result", Value.simple( jsonObject.get("param")).asString(),
                                     JSONUtil.parse(jsonObject.get("message"))));
-                            Tio.send(channel,WsResponse.fromText(json,"utf-8"));
+                            Tio.send(channel,WsResponse.fromText(json, WsPacket.CHARSET_NAME));
                         } catch (JsonProcessingException e) {
                             log.error("ws消息订阅,解析失败,message:【】",message.toString());
                         }

+ 2 - 2
coffee-system/src/main/java/com/coffee/bus/controller/BusAlarmController.java

@@ -45,9 +45,9 @@ public class BusAlarmController extends BaseCrudController<BusDeviceAlarmEntity,
 
     @PostMapping("/query/page")
     @SaCheckPermission("bus:alarm:query")
-    @ApiOperation(value = "分页查询",notes = "权限:【bus:alarm:query】")
+    @ApiOperation(value = "分页(输注查询)查询",notes = "权限:【bus:alarm:query】")
     public R<IPage<BusDeviceAlarmEntity>> page(@RequestBody@Validated AlarmQuery query){
-        return R.success(deviceAlarmService.page(query));
+        return R.success(deviceAlarmService.pageQuery(query));
     }
     @Override
     public BaseService<? extends Mapper<BusDeviceAlarmEntity>, BusDeviceAlarmEntity, String> getService() {

+ 17 - 14
coffee-system/src/main/java/com/coffee/bus/controller/BusClinicController.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.coffee.bus.controller.vo.ClinicStatsVo;
 import com.coffee.bus.entity.*;
+import com.coffee.bus.registry.device.DeviceRegistry;
 import com.coffee.bus.service.*;
 import com.coffee.bus.service.dto.*;
 import com.coffee.common.exception.CustomException;
@@ -12,13 +13,11 @@ import com.coffee.common.result.R;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
-
-import javax.validation.constraints.NotNull;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.CompletableFuture;
-import java.util.function.Consumer;
-import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -38,7 +37,7 @@ public class BusClinicController {
     private final LocalBusInfusionHistoryService infusionHistoryService;
     private final LocalBusInfusionModifyService infusionModifyService;
     private final LocalBusDeviceHistoryService deviceHistoryService;
-
+    private final DeviceRegistry deviceRegistry;
     @PostMapping("/stats")
     @ApiOperation(value = "临床过程中的数据记录",notes = "权限【无】")
     public R<ClinicStatsReturnResult> stats(@RequestBody ClinicStatsVo statsVo) {
@@ -49,7 +48,7 @@ public class BusClinicController {
     @PostMapping("/page")
     @SaCheckPermission("bus:clinic:query")
     @ApiOperation(value = "临床管理分页查询",notes = "权限【bus:clinic:query】")
-    public R<IPage<ClinicResult>> page(@RequestBody ClinicQuery query) {
+    public R<IPage<ClinicResult>> page(@RequestBody@Validated ClinicQuery query) {
         return R.success(clinicService.pageQuery(query));
     }
 
@@ -75,6 +74,17 @@ public class BusClinicController {
                     List<BusInfusionHistoryEntity> infusionHistories = infusionHistoryService.list(new QueryWrapper<BusInfusionHistoryEntity>().lambda()
                             .eq(BusInfusionHistoryEntity::getClinicId, clinicId)
                             .orderByAsc(BusInfusionHistoryEntity::getStartTime));
+
+                    //添加设备别名
+                    Map<String, List<BusInfusionHistoryEntity>> infusionByDeviceId = infusionHistories.stream().collect(Collectors.groupingBy(BusInfusionHistoryEntity::getDeviceId));
+                    infusionByDeviceId.forEach((deviceId,infusions)->{
+                        String alias = deviceRegistry.getOperator(deviceId).getAlias();
+                        infusions.forEach(infusion->infusion.setAlias(alias));
+                    });
+
+                    result.fillUndoInfo(infusionHistories);
+
+
                     List<String> infusionIds = infusionHistories.stream().map(BusInfusionHistoryEntity::getId).collect(Collectors.toList());
                     List<BusInfusionModifyEntity> infusionModifies = infusionModifyService.list(new QueryWrapper<BusInfusionModifyEntity>().lambda()
                             .in(BusInfusionModifyEntity::getInfusionId, infusionIds));
@@ -101,14 +111,7 @@ public class BusClinicController {
                     //填充统计信息
                     result.setStats(ClinicStatsReturnResult.of(statsQueryResults));
                 })
-                .join()
-        ;
-
-
-
-        //填充输注信息和输注修改参数
-
-        //填充统计图表
+                .join();
 
 
         return R.success(result);

+ 17 - 0
coffee-system/src/main/java/com/coffee/bus/controller/BusDeviceHistoryController.java

@@ -1,12 +1,22 @@
 package com.coffee.bus.controller;
 
+import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.baomidou.mybatisplus.core.mapper.Mapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.coffee.bus.entity.BusDeviceAlarmEntity;
 import com.coffee.bus.entity.BusDeviceHistoryEntity;
 import com.coffee.bus.service.LocalBusDeviceHistoryService;
+import com.coffee.bus.service.dto.AlarmQuery;
+import com.coffee.bus.service.dto.DeviceHistoryQuery;
 import com.coffee.common.crud.BaseService;
 import com.coffee.common.crud.controller.BaseCrudController;
+import com.coffee.common.result.R;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -33,6 +43,13 @@ public class BusDeviceHistoryController extends BaseCrudController<BusDeviceHist
         return "device:history";
     }
 
+    @PostMapping("/query/page")
+    @SaCheckPermission("bus:history:query")
+    @ApiOperation(value = "分页(输注查询)查询",notes = "权限:【bus:history:query】")
+    public R<IPage<BusDeviceHistoryEntity>> page(@RequestBody @Validated DeviceHistoryQuery query){
+        return R.success(historyService.pageQuery(query));
+    }
+
     @Override
     public BaseService<? extends Mapper<BusDeviceHistoryEntity>, BusDeviceHistoryEntity, String> getService() {
         return historyService;

+ 18 - 2
coffee-system/src/main/java/com/coffee/bus/controller/BusEvaluationController.java

@@ -1,12 +1,20 @@
 package com.coffee.bus.controller;
 
+import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.baomidou.mybatisplus.core.mapper.Mapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.coffee.bus.entity.BusEvaluationEntity;
 import com.coffee.bus.service.LocalBusEvaluationService;
+import com.coffee.bus.service.dto.EvalQuery;
 import com.coffee.common.crud.BaseService;
 import com.coffee.common.crud.controller.BaseCrudController;
+import com.coffee.common.result.R;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -22,9 +30,17 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/bus/eval")
 @Api(tags = "评价管理",description = "统一权限前缀(bus:eval),bus:eval:add")
 public class BusEvaluationController extends BaseCrudController<BusEvaluationEntity, String> {
-    private final LocalBusEvaluationService scoreService;
+    private final LocalBusEvaluationService evaluationService;
 
 
+
+    @PostMapping("/query/page")
+    @SaCheckPermission("bus:eval:query")
+    @ApiOperation(value = "评价(输注查询)查询",notes = "权限:【bus:eval:query】")
+    public R<IPage<BusEvaluationEntity>> page(@RequestBody @Validated EvalQuery query){
+        return R.success(evaluationService.pageQuery(query));
+    }
+
     /**
      * 权限控制前缀
      * @return
@@ -36,6 +52,6 @@ public class BusEvaluationController extends BaseCrudController<BusEvaluationEnt
 
     @Override
     public BaseService<? extends Mapper<BusEvaluationEntity>, BusEvaluationEntity, String> getService() {
-        return scoreService;
+        return evaluationService;
     }
 }

+ 10 - 16
coffee-system/src/main/java/com/coffee/bus/controller/BusPatientController.java

@@ -234,33 +234,27 @@ public class BusPatientController  implements BaseQueryController<BusPatientEnti
     }
 
 
-    @GetMapping("/monitor/{monitorType}/{patientCode}")
+    @GetMapping("/monitor/{monitorType}/{clinicId}")
     @SaCheckPermission("device:patient:query")
     @ApiOperation(value = "查看病人当前监控详情",notes = "查看病人当前监控详情,权限标识为【device:patient:query】")
-    public R<PatientMonitorDetailResult> monitor(@PathVariable("monitorType")@ApiParam(value = "是否为有泵监控",example = "0、无泵,1、有泵") Boolean haveDevice, @PathVariable("patientCode")@ApiParam(value = "病号") String patientCode){
+    public R<PatientMonitorDetailResult> monitor(@PathVariable("monitorType")@ApiParam(value = "是否为有泵监控",example = "0、无泵,1、有泵") Boolean haveDevice, @PathVariable("clinicId")@ApiParam(value = "临床id")String clinicId){
         PatientMonitorDetailResult result = new PatientMonitorDetailResult();
+        BusClinicEntity clinic = clinicService.getById(clinicId);
+        result.setClinic(clinic);
+        if(clinic==null){
+            throw new CustomException("该临床信息不存在,请刷新后重试");
+        }
         if(haveDevice){
-            BusPatientEntity patient = patientService.getOne(new QueryWrapper<BusPatientEntity>().lambda()
-                    .eq(BusPatientEntity::getCode, patientCode).last("limit 1"));
-            BusInfusionHistoryEntity infusion = infusionService.getById(patient.getInfusionId());
+            BusInfusionHistoryEntity infusion = infusionService.getOne(new QueryWrapper<BusInfusionHistoryEntity>().lambda().eq(BusInfusionHistoryEntity::getClinicId,clinic.getId())
+                    .orderByDesc(BusInfusionHistoryEntity::getStartTime).last("limit 1"));
             infusion.setAlias(deviceRunningService.getAliasName(infusion.getDeviceId()));
             result.setInfusion(infusion);
-            BusDeviceRunningEntity deviceRunning = deviceRunningService.getOne(new QueryWrapper<BusDeviceRunningEntity>()
-                    .lambda()
-                    .select(BusDeviceRunningEntity::getAlias).eq(BusDeviceRunningEntity::getId, infusion.getId()));
-            if(deviceRunning!=null){
-                infusion.setAlias(deviceRunning.getAlias());
-            }
             if(StrUtil.isNotEmpty(infusion.getClinicId())){
                 result.setClinic(clinicService.getById(infusion.getClinicId()));
             }
         }else {
             //无泵查看
-            BusClinicEntity clinic = clinicService.getOne(new QueryWrapper<BusClinicEntity>().lambda().eq(BusClinicEntity::getPatientCode, patientCode).eq(BusClinicEntity::getMonitorType, false).orderByDesc(BusClinicEntity::getStartTime).last("limit 1"));
-            if(clinic!=null){
-                result.setClinic(clinic);
-                result.setDeviceManual( manualService.getOne(new QueryWrapper<BusDeviceManualEntity>().lambda().eq(BusDeviceManualEntity::getClinicId, clinic.getId())));
-            }
+            result.setDeviceManual( manualService.getOne(new QueryWrapper<BusDeviceManualEntity>().lambda().eq(BusDeviceManualEntity::getClinicId, clinic.getId())));
         }
         return R.success(result);
     }

+ 4 - 1
coffee-system/src/main/java/com/coffee/bus/entity/BusEvaluationEntity.java

@@ -31,7 +31,10 @@ public class BusEvaluationEntity extends TenantGenericEntity<String,String> {
     @Length(max = 255,message = "病号长度不得超过255个字节")
     public String patientCode;
 
-    @ApiModelProperty(value = "临床号")
+    @ApiModelProperty(value = "输注id,输注监控专用")
+    private String infusionId;
+
+    @ApiModelProperty(value = "临床号,无泵专用")
     @Length(max = 255,message = "临床号长度不得超过255个字节")
     private String clinicId;
 

+ 8 - 0
coffee-system/src/main/java/com/coffee/bus/mapper/BusDeviceHistoryMapper.java

@@ -1,8 +1,14 @@
 package com.coffee.bus.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.coffee.bus.entity.BusDeviceAlarmEntity;
 import com.coffee.bus.entity.BusDeviceHistoryEntity;
+import com.coffee.bus.service.dto.AlarmQuery;
+import com.coffee.bus.service.dto.DeviceHistoryQuery;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * @author lifang
@@ -13,4 +19,6 @@ import org.apache.ibatis.annotations.Mapper;
  */
 @Mapper
 public interface BusDeviceHistoryMapper extends BaseMapper<BusDeviceHistoryEntity> {
+
+    IPage<BusDeviceHistoryEntity> pageQuery(Page<BusDeviceHistoryEntity> page,@Param("query") DeviceHistoryQuery query);
 }

+ 5 - 0
coffee-system/src/main/java/com/coffee/bus/mapper/BusEvaluationMapper.java

@@ -1,8 +1,12 @@
 package com.coffee.bus.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.coffee.bus.entity.BusEvaluationEntity;
+import com.coffee.bus.service.dto.EvalQuery;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * @author lifang
@@ -13,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
  */
 @Mapper
 public interface BusEvaluationMapper extends BaseMapper<BusEvaluationEntity> {
+    IPage<BusEvaluationEntity> pageQuery(Page<BusEvaluationEntity> page,@Param("query") EvalQuery query);
 }

+ 1 - 1
coffee-system/src/main/java/com/coffee/bus/service/LocalBusDeviceAlarmService.java

@@ -37,7 +37,7 @@ public class LocalBusDeviceAlarmService extends BaseService<BusDeviceAlarmMapper
 
     }
 
-    public IPage<BusDeviceAlarmEntity> page(AlarmQuery query){
+    public IPage<BusDeviceAlarmEntity> pageQuery(AlarmQuery query){
         return this.baseMapper.pageQuery(query.getPage(),query);
     }
     /**

+ 9 - 0
coffee-system/src/main/java/com/coffee/bus/service/LocalBusDeviceHistoryService.java

@@ -1,7 +1,11 @@
 package com.coffee.bus.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.coffee.bus.entity.BusDeviceAlarmEntity;
 import com.coffee.bus.entity.BusDeviceHistoryEntity;
 import com.coffee.bus.mapper.BusDeviceHistoryMapper;
+import com.coffee.bus.service.dto.AlarmQuery;
+import com.coffee.bus.service.dto.DeviceHistoryQuery;
 import com.coffee.common.crud.BaseService;
 import org.springframework.stereotype.Service;
 
@@ -28,4 +32,9 @@ public class LocalBusDeviceHistoryService extends BaseService<BusDeviceHistoryMa
     public void validateBeforeDelete(String id) {
 
     }
+
+
+    public IPage<BusDeviceHistoryEntity> pageQuery(DeviceHistoryQuery query){
+        return this.baseMapper.pageQuery(query.getPage(),query);
+    }
 }

+ 7 - 0
coffee-system/src/main/java/com/coffee/bus/service/LocalBusEvaluationService.java

@@ -1,7 +1,9 @@
 package com.coffee.bus.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.coffee.bus.entity.BusEvaluationEntity;
 import com.coffee.bus.mapper.BusEvaluationMapper;
+import com.coffee.bus.service.dto.EvalQuery;
 import com.coffee.common.crud.BaseService;
 import org.springframework.stereotype.Service;
 
@@ -14,6 +16,11 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class LocalBusEvaluationService extends BaseService<BusEvaluationMapper, BusEvaluationEntity,String> {
+
+    public IPage<BusEvaluationEntity> pageQuery(EvalQuery query) {
+        return this.baseMapper.pageQuery(query.getPage(),query);
+    }
+
     @Override
     public void validateBeforeSave(BusEvaluationEntity entity) {
 

+ 35 - 0
coffee-system/src/main/java/com/coffee/bus/service/dto/ClinicAnalRecordResult.java

@@ -41,11 +41,46 @@ public class ClinicAnalRecordResult implements Serializable {
     @Setter
     private ClinicStatsReturnResult stats;
 
+    @ApiModelProperty(value = "撤泵人")
+    @Setter
+    private String undoBy;
+
+    @ApiModelProperty(value = "销毁人")
+    @Setter
+    private String destroyer;
+
+    @ApiModelProperty(value = "见证人")
+    @Setter
+    private String witnesses;
+
+    @ApiModelProperty(value = "撤泵时间")
+    @Setter
+    private Date undoTime;
 
     private void setInfusionRecords(List<ClinicAnalInfusionRecord> infusionRecords){
         this.infusionRecords=infusionRecords;
     }
 
+    /**
+     * 描述: 填充撤泵信息
+     * @author lifang
+     * @date 2022/5/17 8:59
+     * @param infusionHistories
+     * @return void
+     */
+    public void fillUndoInfo(List<BusInfusionHistoryEntity> infusionHistories){
+        infusionHistories.sort((t1,t2)->t2.getStartTime().compareTo(t1.getStartTime()));
+        //找到最后一个撤泵信息
+        Optional<BusInfusionHistoryEntity> undoInfo = infusionHistories.stream().filter(infusion -> Boolean.TRUE.equals(infusion.getIsUndo()))
+                .findFirst();
+        if(undoInfo.isPresent()){
+            this.setUndoBy(undoInfo.get().getUndoBy());
+            this.setDestroyer(undoInfo.get().getDestroyer());
+            this.setWitnesses(undoInfo.get().getWitnesses());
+            this.setUndoTime(undoInfo.get().getUndoTime());
+        }
+
+    }
     /**
      * 描述: 填充并计算输注修改记录
      * @author lifang

+ 31 - 0
coffee-system/src/main/java/com/coffee/bus/service/dto/DeviceHistoryQuery.java

@@ -0,0 +1,31 @@
+package com.coffee.bus.service.dto;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.coffee.bus.entity.BusDeviceAlarmEntity;
+import com.coffee.bus.entity.BusDeviceHistoryEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author lifang
+ * @version 1.0.0
+ * @ClassName AlarmQuery.java
+ * @Description TODO
+ * @createTime 2022年05月16日 21:28:00
+ */
+@Data
+@ApiModel("设备历史信息查询参数")
+public class DeviceHistoryQuery {
+    @ApiModelProperty("临床id")
+    @NotNull(message = "临床id不能为空")
+    private String clinicId;
+    @ApiModelProperty("设备id")
+    @NotNull(message = "设备id不能为空")
+    private String deviceId;
+    @ApiModelProperty("分页参数")
+    @NotNull(message = "分页参数不能为空")
+    private Page<BusDeviceHistoryEntity> page;
+}

+ 31 - 0
coffee-system/src/main/java/com/coffee/bus/service/dto/EvalQuery.java

@@ -0,0 +1,31 @@
+package com.coffee.bus.service.dto;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.coffee.bus.entity.BusDeviceAlarmEntity;
+import com.coffee.bus.entity.BusEvaluationEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author lifang
+ * @version 1.0.0
+ * @ClassName AlarmQuery.java
+ * @Description TODO
+ * @createTime 2022年05月16日 21:28:00
+ */
+@Data
+@ApiModel("评价查询参数")
+public class EvalQuery {
+    @ApiModelProperty("临床id")
+    @NotNull(message = "临床id不能为空")
+    private String clinicId;
+    @ApiModelProperty("设备id")
+    @NotNull(message = "设备id不能为空")
+    private String deviceId;
+    @ApiModelProperty("分页参数")
+    @NotNull(message = "分页参数不能为空")
+    private Page<BusEvaluationEntity> page;
+}

+ 3 - 0
coffee-system/src/main/java/com/coffee/bus/service/dto/PatientMonitorResult.java

@@ -36,6 +36,9 @@ public class PatientMonitorResult {
     @ApiModelProperty(value = "病人报警信息",example = "泵重复,无泵")
     private PatientAlarmEnum patientAlarm;
 
+    @ApiModelProperty("输注id")
+    private String infusionId;
+
     @ApiModelProperty(value = "设备id")
     private String deviceId;
 

+ 1 - 1
coffee-system/src/main/resources/mapper/bus/BusDeviceAlarmMapper.xml

@@ -5,7 +5,7 @@
 
     <select id="pageQuery" parameterType="com.coffee.bus.service.dto.AlarmQuery" resultType="com.coffee.bus.entity.BusDeviceAlarmEntity">
         select a.* from
-        bus_device_alarm as a
+        (select * from bus_device_alarm where alarm=1) as a
         join (select * from bus_infusion_history where clinic_id=#{query.clinicId} and device_id=#{query.deviceId}) as h
         on a.infusion_id=h.id
     </select>

+ 14 - 0
coffee-system/src/main/resources/mapper/bus/BusDeviceHistoryMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.coffee.bus.mapper.BusDeviceHistoryMapper">
+
+
+    <select id="pageQuery" parameterType="com.coffee.bus.service.dto.DeviceHistoryQuery" resultType="com.coffee.bus.entity.BusDeviceHistoryEntity">
+        select h.* from
+         bus_device_history  as h
+        join (select * from bus_infusion_history where clinic_id=#{query.clinicId} and device_id=#{query.deviceId}) as i
+        on h.infusion_id=i.id
+    </select>
+
+
+</mapper>

+ 14 - 0
coffee-system/src/main/resources/mapper/bus/BusEvaluationMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.coffee.bus.mapper.BusEvaluationMapper">
+
+
+    <select id="pageQuery" parameterType="com.coffee.bus.service.dto.EvalQuery" resultType="com.coffee.bus.entity.BusEvaluationEntity">
+        select e.* from
+         bus_evaluation  as e
+        join (select * from bus_infusion_history where clinic_id=#{query.clinicId} and device_id=#{query.deviceId}) as i
+        on e.infusion_id=i.id
+    </select>
+
+
+</mapper>

+ 2 - 0
coffee-system/src/main/resources/mapper/bus/BusPatientMapper.xml

@@ -25,6 +25,7 @@
         <result column="patient_code" property="patientCode"/>
         <result column="patient_age" property="patientAge"/>
         <result column="gender" property="gender"/>
+        <result column="infusion_id" property="infusionId"/>
         <result column="patient_alarm" property="patientAlarm"/>
         <result column="device_id" property="deviceId"/>
         <result column="device_alias" property="deviceAlias"/>
@@ -141,6 +142,7 @@
         select
         p.`code` as patient_code,
         p.alarm as patient_alarm,
+        i.id as infusion_id,
         i.device_id as device_id,
         i.clinic_id as clinic_id,
         i.ward as ward,

+ 0 - 32
pom.xml

@@ -37,7 +37,6 @@
         <tio.version>3.6.0.v20200315-RELEASE</tio.version>
         <jython.version>2.7.1</jython.version>
         <knife4j.version>2.0.7</knife4j.version>
-        <docker.location>192.168.100.32</docker.location>
     </properties>
 
     <modules>
@@ -223,37 +222,6 @@
         </resources>
         <pluginManagement>
             <plugins>
-                <!--docker 打包插件-->
-                <plugin>
-                    <groupId>com.spotify</groupId>
-                    <artifactId>docker-maven-plugin</artifactId>
-                    <version>1.2.2</version>
-                    <executions>
-                        <execution>
-                            <id>build-image</id>
-                            <phase>package</phase>
-                            <goals>
-                                <goal>build</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                    <configuration>
-                        <imageTags>
-                            <imageTag>latest</imageTag>
-                        </imageTags>
-                        <imageName>${project.artifactId}</imageName>
-                        <dockerHost>${docker.location}</dockerHost>
-                        <dockerDirectory>${project.basedir}</dockerDirectory>
-                        <!-- 这里是复制 jar 包到 docker 容器指定目录配置,也可以写到 Docokerfile 中 -->
-                        <!--                    <resources>
-                                                <resource>
-                                                    <targetPath>/</targetPath>
-                                                    <directory>${project.build.directory}</directory>
-                                                    <include>${project.build.finalName}.jar</include>
-                                                </resource>
-                                            </resources>-->
-                    </configuration>
-                </plugin>
                 <plugin>
                     <groupId>org.springframework.boot</groupId>
                     <artifactId>spring-boot-maven-plugin</artifactId>