xuhy
2025-10-13 782cef1a49bb665fd88f3850a9193c08d63ef1d5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSysAppUserController.java
@@ -239,6 +239,21 @@
        return R.ok();
    }
    /**
     * 修改用户慢性病
     */
    @Log(title = "用户管理信息-修改用户慢性病", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改用户慢性病")
    @PostMapping(value = "/updateDisease")
    public R<Boolean> updateDisease(@RequestParam(value = "id") String id,
                                    @RequestParam(value = "chronicDiseaseId") String chronicDiseaseId) {
        TSysAppUser sysAppUser = new TSysAppUser();
        sysAppUser.setId(id);
        sysAppUser.setChronicDiseaseId(chronicDiseaseId);
        return R.ok(sysAppUserService.updateById(sysAppUser));
    }
    @Log(title = "用户管理信息-慢性病患者导出-平台", businessType = BusinessType.EXPORT)
    @ApiOperation(value = "慢性病患者导出-平台")
    @PostMapping("/exportList")
@@ -310,11 +325,13 @@
        List<TSysAppUserExport> sysAppUserExports = sysAppUserService.exportListAppUser(query);
        for (TSysAppUserExport sysAppUserExport : sysAppUserExports) {
            String lastInspectionTime = sysAppUserExport.getLastInspectionTime();
            lastInspectionTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(lastInspectionTime);
            sysAppUserExport.setLastInspectionTime(lastInspectionTime);
            if(StringUtils.isNotEmpty(lastInspectionTime)){
                lastInspectionTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(lastInspectionTime);
                sysAppUserExport.setLastInspectionTime(lastInspectionTime);
            }
            sysAppUserExport.setCreateTimeStr(sysAppUserExport.getCreateTime().toLocalDate().toString());
        }
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TSysAppUserClinicExport.class, sysAppUserExports);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TSysAppUserExport.class, sysAppUserExports);
        HttpServletResponse response = WebUtils.response();
        assert response != null;
        response.setContentType("application/vnd.ms-excel");