package com.emr.controller;

import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName DeathRecords
 * @Description 死亡病历页面接口
 * @Author linjj
 * @Date 2025/1/8 15:32
 * @Version 1.0
 */
@Controller
@RequestMapping("/death")
public class DeathRecordsController {


    @Autowired
    private Archive_MasterService archiveMasterService;


    /**
     * @description: 前端映射接口
     * @author linjj
     * @date: 2025/1/8 15:33
     */
    @RequestMapping(value = "/deathRecords")
    public String faults(Model model) {
        return "deathRecordsDir/deathRecords";
    }
    /**
     * @description: 死亡病历查询接口
     * @params:
     * @return:
     * @author linjj
     * @date: 2025/1/8 15:38
     */
    @ResponseBody
    @RequestMapping(value = "/deathRecordList")
    public OffsetLimitPage deathRecordList(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
        OffsetLimitPage result = archiveMasterService.deathRecordList(archiveMasterVo, offset, limit);
        return result;
    }
}
