eight
2024-09-20 6f9f5260a6ccf2fb653707f54b44bc5f111d684a
移除 已不用的字段
已修改6个文件
已重命名1个文件
81 ■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/ScreenQueueRespVO.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sql/mysql/jh.sql 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
@@ -1,41 +1,25 @@
package cn.lihu.jh.module.ecg.controller.admin.callingscreen;
import cn.hutool.extra.servlet.ServletUtil;
import cn.lihu.jh.framework.apilog.core.annotation.ApiAccessLog;
import cn.lihu.jh.framework.common.exception.ErrorCode;
import cn.lihu.jh.framework.common.pojo.CommonResult;
import cn.lihu.jh.framework.common.pojo.PageParam;
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.framework.common.util.object.BeanUtils;
import cn.lihu.jh.framework.excel.core.util.ExcelUtils;
import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueuePageReqVO;
import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueRespVO;
import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueSaveReqVO;
import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
import cn.lihu.jh.module.ecg.enums.QueueStatusEnum;
import cn.lihu.jh.module.ecg.service.callingscreen.CallingScreenService;
import cn.lihu.jh.module.ecg.service.config.EcgConfigService;
import cn.lihu.jh.module.ecg.service.queue.QueueService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static cn.lihu.jh.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
import static cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants.SUCCESS;
import static cn.lihu.jh.framework.common.pojo.CommonResult.error;
import static cn.lihu.jh.framework.common.pojo.CommonResult.success;
@@ -51,16 +35,16 @@
    @Resource
    private EcgConfigService ecgConfigService;
    @GetMapping("/calling-data")
    @GetMapping("/big-screen-data")
    @Operation(summary = "大屏叫号数据")
    @PermitAll
    public CommonResult<Map<Integer, List<CallingRespVO>>> callingData()
    public CommonResult<Map<Integer, List<ScreenQueueRespVO>>> callingData()
    {
        Map<Integer, List<QueueDO>> map = callingScreenService.callingData();
        Map<Integer, List<CallingRespVO>> mapVO = new HashMap<>();
        Map<Integer, List<ScreenQueueRespVO>> mapVO = new HashMap<>();
        map.keySet().forEach( key -> {
            mapVO.put(key, BeanUtils.toBean(map.get(key), CallingRespVO.class));
            mapVO.put(key, BeanUtils.toBean(map.get(key), ScreenQueueRespVO.class));
        });
        return success( mapVO );
@@ -69,7 +53,7 @@
    @GetMapping("/room-screen-data")
    @Operation(summary = "诊间屏数据")
    @PermitAll
    public CommonResult<Map<Integer, List<CallingRespVO>>> callingDataRoom(HttpServletRequest request)
    public CommonResult<Map<Integer, List<ScreenQueueRespVO>>> callingDataRoom(HttpServletRequest request)
    {
        String reqIp = ServletUtil.getClientIP(request);
@@ -83,21 +67,10 @@
        List<QueueDO> passedList = queueDOList.stream().filter(queue -> queue.getStatus() == QueueStatusEnum.PASSED.getStatus()).toList();
        queueDOList.removeIf(queue -> queue.getStatus() == QueueStatusEnum.PASSED.getStatus());
        Map<Integer, List<CallingRespVO>> mapVO = new HashMap<>();
        mapVO.put(1, BeanUtils.toBean(queueDOList, CallingRespVO.class));
        mapVO.put(2, BeanUtils.toBean(passedList, CallingRespVO.class));
        Map<Integer, List<ScreenQueueRespVO>> mapVO = new HashMap<>();
        mapVO.put(1, BeanUtils.toBean(queueDOList, ScreenQueueRespVO.class));
        mapVO.put(2, BeanUtils.toBean(passedList, ScreenQueueRespVO.class));
        return success( mapVO );
    }
    @GetMapping("/mark-called")
    @Operation(summary = "诊间屏数据")
    @PermitAll
    public CommonResult<Integer> markCalled(@RequestParam("patId") String patId)
    {
        ErrorCode result = callingScreenService.markCalled(patId);
        if (result.equals(SUCCESS))
            return success(0);
        return error(result);
    }
}
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/ScreenQueueRespVO.java
ÎļþÃû´Ó jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingRespVO.java ÐÞ¸Ä
@@ -1,17 +1,14 @@
package cn.lihu.jh.module.ecg.controller.admin.callingscreen;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.models.security.SecurityScheme;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Schema(description = "叫号屏数据")
@Data
public class CallingRespVO {
public class ScreenQueueRespVO {
    @Schema(description = "患者编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "30473")
    @ExcelProperty("患者编号")
@@ -51,10 +48,6 @@
    @Schema(description = "预约过期标记", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("预约过期标记")
    private Byte expired;
    @Schema(description = "语音叫号标记", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("语音叫号标记")
    private Integer called;
    @Schema(description = "插队标记", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("插队标记")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
@@ -67,10 +67,6 @@
     */
    private Byte expired;
    /**
     * è¯­éŸ³å«å·æ ‡è®°
     */
    private Integer called;
    /**
     * æ’队标记
     */
    private Byte jumpFlag;
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java
@@ -104,9 +104,6 @@
            "</script>")
    List<QueueDO> getDoctorQueueByStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("statusList")List<Byte> statusList);
    @Update( "update lihu.queue set called = 1 where pat_id = #{patId}" )
    Integer markCalled(@Param("patId")String patId);
    @Update("update lihu.queue set status = #{newStatus} where seq_num = \n" +
            "(select a.min_seq_num from \n" +
            " (select min(seq_num) as min_seq_num from lihu.queue where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus}) a )")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenService.java
@@ -26,6 +26,4 @@
    Map<Integer, List<QueueDO>> callingData();
    List<QueueDO> getRoomQueue(String ip, List<Byte> statusList);
    ErrorCode markCalled(String patientId);
}
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java
@@ -99,13 +99,4 @@
        return queueDOList;
    }
    @Override
    public ErrorCode markCalled(String patientId) {
        Integer rowNum = queueMapper.markCalled(patientId);
        if (rowNum == 1)
            return GlobalErrorCodeConstants.SUCCESS;
        return PATIENT_NOT_EXISTS;
    }
}
sql/mysql/jh.sql
@@ -54,7 +54,6 @@
     `status` tinyint NOT NULL COMMENT '10:排队中 20:候诊准备 30:就诊中 40:就诊完成 50:过号 60:过期',
     `passed` tinyint DEFAULT '0' COMMENT '过号标记',
     `expired` tinyint DEFAULT '0' COMMENT '预约过期标记',
     `called` int DEFAULT '0' COMMENT '叫号状态 0 æœªæ’­ 1 å·²æ’­ ',
     `jump_flag` tinyint DEFAULT '0' COMMENT '插队标记',
     `room_id` bigint DEFAULT '0' COMMENT '诊室编号',
     `room_name` varchar(10) DEFAULT '' COMMENT '诊室名称',
@@ -70,7 +69,7 @@
     KEY `idx_status` (`status`) USING BTREE,
     KEY `idx_seq_num` (`seq_num`) USING BTREE,
     KEY `idx_room_bed_status` (`room_id`,`bed_no`,`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='排队表';
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='排队表';
-- ----------------------------
-- Table structure for clinic_room
@@ -178,6 +177,7 @@
  `summary` varchar(200) DEFAULT NULL COMMENT '作业概要',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `cancelled` int DEFAULT '0' COMMENT '未安装',
  `lost` int DEFAULT '0',
  `tenant_id` int DEFAULT '1' COMMENT '租户编号',
  `creator` varchar(10) DEFAULT '' COMMENT '创建者',
  `create_time` datetime NOT NULL COMMENT '创建时间',
@@ -186,11 +186,12 @@
  `deleted` bit(1) DEFAULT b'0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `idx_pat_job` (`pat_id`,`job_time`,`job_type`),
  KEY `idx_rent_id` (`rent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='工作记录表';
  KEY `idx_rent_id` (`rent_id`),
  KEY `idx_rent_doc_job` (`job_time`,`doc_id`,`job_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='工作记录表';
-- ----------------------------
-- Table structure for call
-- Table structure for call_patient
-- ----------------------------
DROP TABLE IF EXISTS `call_patient`;
SELECT * FROM lihu.call_patient;CREATE TABLE `call_patient` (