A17404李放 преди 3 години
родител
ревизия
c2019a4e7c

+ 50 - 0
coffee-system/src/main/java/com/coffee/bus/service/dto/ClinicQuery.java

@@ -1,6 +1,7 @@
 package com.coffee.bus.service.dto;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -40,7 +41,56 @@ public class ClinicQuery implements Serializable {
     @ApiModelProperty("开始时间区间")
     private List<Date>  timeRange;
 
+    @ApiModelProperty("是否结束")
+    private Integer finished;
+
     @ApiModelProperty("分页查询参数")
     @NotNull(message = "分页查询参数不可为空")
     private Page<ClinicResult> page;
+
+
+
+    @ApiModelProperty("按照临床开始时间排序")
+    private Boolean clinicStartTimeDesc;
+
+    @ApiModelProperty("按照临床是否结束排序")
+    private Boolean clinicFinishedDesc;
+
+    @ApiModelProperty("按照临床最后上传时间排序")
+    private Boolean clinicEndTimeDesc;
+
+    @ApiModelProperty(value = "降序列",hidden = true)
+    @JsonIgnore
+    private List<String> orderByDesc=new ArrayList<>();
+
+    @ApiModelProperty(value = "升序列",hidden = true)
+    @JsonIgnore
+    private List<String> orderByAsc=new ArrayList<>();
+
+    public void setClinicStartTimeDesc(Boolean clinicStartTimeDesc) {
+        this.clinicStartTimeDesc = clinicStartTimeDesc;
+        if (Boolean.TRUE.equals(clinicStartTimeDesc)) {
+            orderByDesc.add("clinic_start_time");
+        }else if(Boolean.FALSE.equals(clinicStartTimeDesc)){
+            orderByAsc.add("clinic_start_time");
+        }
+    }
+
+    public void setClinicFinishedDesc(Boolean clinicFinishedDesc) {
+        this.clinicFinishedDesc = clinicFinishedDesc;
+        if (Boolean.TRUE.equals(clinicFinishedDesc)) {
+            orderByDesc.add("finished");
+        }else if(Boolean.FALSE.equals(clinicFinishedDesc)) {
+            orderByAsc.add("finished");
+        }
+    }
+
+    public void setClinicEndTimeDesc(Boolean clinicEndTimeDesc) {
+        this.clinicEndTimeDesc = clinicEndTimeDesc;
+        if (Boolean.TRUE.equals(clinicEndTimeDesc)) {
+            orderByDesc.add("monitor_end_time");
+        }else if(Boolean.FALSE.equals(clinicEndTimeDesc)){
+            orderByAsc.add("monitor_end_time");
+        }
+    }
 }

+ 47 - 0
coffee-system/src/main/java/com/coffee/bus/service/dto/CombineQuery.java

@@ -101,6 +101,8 @@ public class CombineQuery {
     @ApiModelProperty("自控类型 0、有效 1、无效 2、总数")
     private Integer pcaType;
 
+    @ApiModelProperty("是否已结束")
+    private Integer finished;
 
     /**
      * 根据此提醒进行解析
@@ -129,6 +131,25 @@ public class CombineQuery {
     @NotNull(message = "分页参数不可为空")
     private Page<CombineResult> page;
 
+
+    @ApiModelProperty("按照输注开始时间排序")
+    private Boolean infusionStartTimeDesc;
+
+    @ApiModelProperty("按照输注是否结束排序")
+    private Boolean infusionFinishedDesc;
+
+    @ApiModelProperty("按照输注最后上传时间排序")
+    private Boolean infusionLastUploadTimeDesc;
+
+
+    @ApiModelProperty(value = "降序列",hidden = true)
+    @JsonIgnore
+    private List<String> orderByDesc=new ArrayList<>();
+
+    @ApiModelProperty(value = "升序列",hidden = true)
+    @JsonIgnore
+    private List<String> orderByAsc=new ArrayList<>();
+
     @ApiModelProperty("统计查询时的时间枚举条件, 1、天 2、周 3、月")
     private StatsTimeUnit timeUnit;
     public void setPcaCountRange(List<Integer> pcaCountRange) {
@@ -165,6 +186,32 @@ public class CombineQuery {
         }
     }
 
+    public void setInfusionStartTimeDesc(Boolean infusionStartTimeDesc) {
+        this.infusionStartTimeDesc = infusionStartTimeDesc;
+        if (Boolean.TRUE.equals(infusionStartTimeDesc)) {
+            orderByDesc.add("infusion_start_time");
+        }else if(Boolean.FALSE.equals(infusionStartTimeDesc)){
+            orderByAsc.add("infusion_start_time");
+        }
+    }
+
+    public void setInfusionFinishedDesc(Boolean infusionFinishedDesc) {
+        this.infusionFinishedDesc = infusionFinishedDesc;
+        if (Boolean.TRUE.equals(infusionFinishedDesc)) {
+            orderByDesc.add("infusion_finished");
+        }else if(Boolean.FALSE.equals(infusionFinishedDesc)){
+            orderByAsc.add("infusion_finished");
+        }
+    }
+
+    public void setInfusionLastUploadTimeDesc(Boolean infusionLastUploadTimeDesc) {
+        this.infusionLastUploadTimeDesc = infusionLastUploadTimeDesc;
+        if (Boolean.TRUE.equals(infusionLastUploadTimeDesc)) {
+            orderByDesc.add("last_upload_time");
+        }else if(Boolean.FALSE.equals(infusionLastUploadTimeDesc)){
+            orderByAsc.add("last_upload_time");
+        }
+    }
 
     /**
      * 将前端的提醒查询做统一封装,做请求处理

+ 0 - 1
coffee-system/src/main/java/com/coffee/bus/websocket/HisConnectionHandler.java

@@ -1,7 +1,6 @@
 package com.coffee.bus.websocket;
 
 import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.coffee.bus.entity.BusHospitalEntity;

+ 0 - 6
coffee-system/src/main/java/com/coffee/system/common/dto/SysUserAddDTO.java

@@ -103,12 +103,6 @@ public class SysUserAddDTO implements Serializable {
      */
     private String deptId;
 
-    /**
-     * 锁定标记 0正常;1锁定
-     */
-    @NotBlank(message = "锁定标记不能为空")
-    private String lockFlag;
-
     /**
      * 排序
      */

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

@@ -99,6 +99,9 @@
             <if test="query.monitorType!=null">
                 and monitor_type=#{query.monitorType}
             </if>
+            <if test="query.finished!=null">
+                and finished=#{query.finished}
+            </if>
             <if test="query.surgeryName!=null">
                 and surgery_name like concat('%',#{query.surgeryName},'%')
             </if>
@@ -125,6 +128,21 @@
         ) as c
         left join  (select clinic_id,count(1) as infusion_count from bus_infusion_history GROUP BY clinic_id) as i on i.clinic_id=c.id
         left join (select clinic_id,count(1) as eval_count from bus_evaluation  GROUP BY clinic_id) as eval on eval.clinic_id=c.id
-        order by c.monitor_start_time desc
+        <if test="(query.orderByDesc!=null and query.orderByDesc.size > 0 ) or (query.orderByAsc!=null and query.orderByAsc.size > 0)">
+            order by
+        </if>
+        <if test="query.orderByDesc!=null and query.orderByDesc.size > 0">
+            <foreach item="descItem" index="index" collection="query.orderByDesc" open="" separator="," close="">
+                ${descItem} desc
+            </foreach>
+        </if>
+        <if test="query.orderByAsc!=null and query.orderByAsc.size > 0">
+            <if test="query.orderByDesc!=null and query.orderByDesc.size > 0">
+                ,
+            </if>
+            <foreach item="ascItem" index="index" collection="query.orderByAsc" open="" separator="," close="">
+                ${ascItem} asc
+            </foreach>
+        </if>
     </select>
 </mapper>

+ 22 - 0
coffee-system/src/main/resources/mapper/bus/BusInfusionHistoryMapper.xml

@@ -204,6 +204,11 @@
                 and device_id like concat('%',#{query.deviceId},'%')
             </if>
 
+            <if test="query.finished != null">
+                and device_id =#{query.finished}
+            </if>
+
+
             <if test="query.validPcaCountRange != null and query.validPcaCountRange.size > 0">
                 and pca_valid_count &gt;  #{query.validPcaCountRange[0]}
                 <if test="query.validPcaCountRange.size >1 ">
@@ -308,6 +313,23 @@
         </where>
         ) as c
         on i.clinic_id=c.id
+        <if test="(query.orderByDesc!=null and query.orderByDesc.size > 0) or (query.orderByAsc!=null and query.orderByAsc.size > 0)">
+            order by
+        </if>
+        <if test="query.orderByDesc!=null and query.orderByDesc.size > 0">
+            <foreach item="descItem" index="index" collection="query.orderByDesc" open="" separator="," close="">
+--             !!!!这里使用$不要使用#,否自只是对列名(字符串)进行排序,而不是进行列排序
+                ${descItem} desc
+            </foreach>
+        </if>
+        <if test="query.orderByAsc!=null and query.orderByAsc.size > 0">
+            <if test="query.orderByDesc!=null and query.orderByDesc.size > 0">
+                ,
+            </if>
+            <foreach item="ascItem" index="index" collection="query.orderByAsc" open="" separator="," close="">
+                ${ascItem} asc
+            </foreach>
+        </if>
     </select>