From 7b55e2cd82647b87d79a778ed70fdbddb39ac00a Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期二, 24 九月 2024 13:44:26 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java | 64 +++++++++++++++++++++++++------- 1 files changed, 50 insertions(+), 14 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java index 830e8fb..f050fa6 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java @@ -8,17 +8,18 @@ import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; -import com.ruoyi.common.log.enums.OperatorType; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.other.api.domain.TEnterpriseUserApplication; import com.ruoyi.other.query.PassDto; import com.ruoyi.other.service.TEnterpriseUserApplicationService; import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.List; /** @@ -67,22 +68,57 @@ @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "集团用户列表") @PostMapping(value = "/page") - public R<Page<TEnterpriseUserApplication>> page(EnterpriseQuery enterpriseQuery) { + public R<Page<TEnterpriseUserApplication>> page(@RequestBody EnterpriseQuery enterpriseQuery) { // 用户id - if (enterpriseQuery.getPhone()!=null) { - List<Long> userIds = appUserClient.getUserIdsByPhone(enterpriseQuery.getPhone()).getData(); - if (userIds.isEmpty()){ - return R.ok(); - } - Page<TEnterpriseUserApplication> page = enterpriseUserApplicationService.lambdaQuery().in(TEnterpriseUserApplication::getAppUserId, userIds).page(Page.of(enterpriseQuery.getPageCurr(), enterpriseQuery.getPageSize())); - return R.ok(page); - }else { - Page<TEnterpriseUserApplication> page = enterpriseUserApplicationService.lambdaQuery().page(Page.of(enterpriseQuery.getPageCurr(), enterpriseQuery.getPageSize())); +// if (enterpriseQuery.getPhone()!=null) { +// List<Long> userIds = appUserClient.getUserIdsByPhone(enterpriseQuery.getPhone()).getData(); +// if (userIds.isEmpty()){ +// return R.ok(); +// } +// Page<TEnterpriseUserApplication> page = enterpriseUserApplicationService.lambdaQuery().in(TEnterpriseUserApplication::getAppUserId, userIds).page(Page.of(enterpriseQuery.getPageCurr(), enterpriseQuery.getPageSize())); +// return R.ok(page); +// }else { + Page<TEnterpriseUserApplication> page = enterpriseUserApplicationService.lambdaQuery().eq(enterpriseQuery.getPhone()!=null&&enterpriseQuery.getPhone()!="",TEnterpriseUserApplication::getPhone,enterpriseQuery.getPhone()).page(Page.of(enterpriseQuery.getPageCurr(), enterpriseQuery.getPageSize())); return R.ok(page); - } +// } } - - + + + @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "导出") + @PutMapping(value = "/export") + @Log(title = "【申请建桩】导出建桩申请列表", businessType = BusinessType.EXPORT) + public R<List<TEnterpriseUserApplication>> export() { + + + List<TEnterpriseUserApplication> list = enterpriseUserApplicationService.lambdaQuery().list(); + + return R.ok(list); +// Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TEnterpriseExport.class, orderInvoiceExports); +// HttpServletResponse response = WebUtils.response(); +// response.setCharacterEncoding("utf-8"); +// ServletOutputStream outputStream = null; +// try { +// String fileName = URLEncoder.encode("公司导出.xls", "utf-8"); +// response.setHeader("Content-Disposition", "attachment;filename=" + fileName); +// response.setContentType("application/vnd.ms-excel;charset=UTF-8"); +// response.setHeader("Pragma", "no-cache"); +// response.setHeader("Cache-Control", "no-cache"); +// outputStream = response.getOutputStream(); +// workbook.write(outputStream); +// } catch (IOException e) { +// e.printStackTrace(); +// } finally { +// try { +// workbook.close(); +// outputStream.close(); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// } + } + + + @Log(title = "【集团用户申请】填写备注", businessType = BusinessType.INSERT) @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "备注") @PostMapping(value = "/remark") -- Gitblit v1.7.1