liusheng
2024-09-21 d3bf339bd64d7b7efddc0afdd4beb1866b8b5a04
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -39,24 +39,24 @@
public class PatArchiveController extends BaseController {
    @Autowired
    private IPatArchiveService patArchiveService;
//
//    /**
//     * 查询患者档案列表
//     */
//    @ApiOperation("查询患者档案列表")
//    @PreAuthorize("@ss.hasPermi('smartor:patarchive:list')")
//   @PostMapping("/list")
//    public TableDataInfo list(@RequestBody PatArchive patArchive) {
//        startPage();
//        List<PatArchive> list = patArchiveService.selectPatArchiveList(patArchive);
//        return getDataTable(list);
//}
    /**
     * 查询患者档案列表
     */
    @ApiOperation("查询患者档案列表")
    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody PatArchive patArchive) {
        startPage();
        List<PatArchive> list = patArchiveService.selectPatArchiveList(patArchive);
        return getDataTable(list);
    }
    /**
     * 导出患者档案列表
     */
    @ApiOperation("导出患者档案列表")
    @PreAuthorize("@ss.hasPermi('smartor:patarchive:export')")
    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:export')")
    @Log(title = "患者档案", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, PatArchive patArchive) {
@@ -69,7 +69,7 @@
     * 获取患者档案详细信息
     */
    @ApiOperation("获取患者档案详细信息")
    @PreAuthorize("@ss.hasPermi('smartor:patarchive:query')")
    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:query')")
    @GetMapping(value = "/getInfo/{patid}")
    @ApiImplicitParam(name = "patid", value = "患者id")
    public AjaxResult getInfo(@PathVariable(name = "patid") Long patid) {
@@ -80,7 +80,7 @@
//     * 新增患者档案
//     */
//    @ApiOperation("新增患者档案")
//    @PreAuthorize("@ss.hasPermi('smartor:patarchive:add')")
//    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:add')")
//    @Log(title = "患者档案", businessType = BusinessType.INSERT)
//    @PostMapping("/add")
//    public AjaxResult add(@RequestBody PatArchive patArchive) {
@@ -88,10 +88,21 @@
//    }
    /**
     * 新增患者档案
     */
    @ApiOperation("修改患者档案")
    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:update')")
    @Log(title = "患者档案", businessType = BusinessType.UPDATE)
    @PostMapping("/update")
    public AjaxResult update(@RequestBody PatArchive patArchive) {
        return toAjax(patArchiveService.update(patArchive));
    }
    /**
     * 新增或修改患者档信息
     */
    @ApiOperation("新增或修改患者档信息")
    @PreAuthorize("@ss.hasPermi('smartor:patarchive:edit')")
    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:edit')")
    @Log(title = "患者档案", businessType = BusinessType.UPDATE)
    @PostMapping("/saveOrUpdatePatInfo")
    public AjaxResult saveOrUpdatePatInfo(@RequestBody PatArchiveVO patArchiveVO) {
@@ -102,7 +113,7 @@
     * 删除患者档案
     */
    @ApiOperation("删除患者档案")
    @PreAuthorize("@ss.hasPermi('smartor:patarchive:remove')")
    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:remove')")
    @Log(title = "患者档案", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{patids}")
    @ApiImplicitParam(name = "patids", value = "患者id集合", dataType = "long", dataTypeClass = Long.class)
@@ -161,6 +172,12 @@
    @PostMapping("/patInfoByContion")
    public TableDataInfo patInfoByCondition(@RequestBody PatArchiveReq patArchive) {
        PageUtils.startPageByPost(patArchive.getPageNum(), patArchive.getPageSize());
        if (CollectionUtils.isEmpty(patArchive.getLeavehospitaldistrictcodes()) || patArchive.getLeavehospitaldistrictcodes().size() == 0) {
            patArchive.setLeavehospitaldistrictcodes(null);
        }
        if (CollectionUtils.isEmpty(patArchive.getLeaveldeptcodes()) || patArchive.getLeaveldeptcodes().size() == 0) {
            patArchive.setLeaveldeptcodes(null);
        }
        List<PatArchive> patArchives = patArchiveService.patInfoByContion(patArchive);
        long count = PageUtils.count(new ISelect() {
            @Override
@@ -196,7 +213,13 @@
    @PostMapping("/getPatientInfo")
    public TableDataInfo getPatientInfo(@RequestBody PatArchiveReq patArchiveReq) {
        PageUtils.startPageByPost(patArchiveReq.getPageNum(), patArchiveReq.getPageSize());
        List<PatTaskRelevance> patientInfo = patArchiveService.getPatientInfo(patArchiveReq);
        if (CollectionUtils.isEmpty(patArchiveReq.getLeavehospitaldistrictcodes()) || patArchiveReq.getLeavehospitaldistrictcodes().size() == 0) {
            patArchiveReq.setLeavehospitaldistrictcodes(null);
        }
        if (CollectionUtils.isEmpty(patArchiveReq.getLeaveldeptcodes()) || patArchiveReq.getLeaveldeptcodes().size() == 0) {
            patArchiveReq.setLeaveldeptcodes(null);
        }
        List<PatArchiveOthreInfo> patientInfo = patArchiveService.getPatientInfo(patArchiveReq);
        long count = PageUtils.count(new ISelect() {
            @Override
            public void doSelect() {
@@ -206,4 +229,5 @@
        return getDataTable2(count, patientInfo);
    }
}