| | |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | 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.annotation.Logical; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | | 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; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 添加计费策略管理 |
| | | */ |
| | | @Log(title = "添加集团用户申请", businessType = BusinessType.INSERT) |
| | | @Log(title = "【我的】添加集团用户申请", businessType = BusinessType.INSERT,operatorType = OperatorType.MOBILE) |
| | | @ApiOperation(tags = {"小程序-集团用户"},value = "添加集团用户申请") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@Validated @RequestBody TEnterpriseUserApplication dto) { |
| | |
| | | dto.setAppUserId(tokenService.getLoginUserApplet().getUserId()); |
| | | return AjaxResult.ok(enterpriseUserApplicationService.save(dto)); |
| | | } |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/groupUserApplication/add"}, logical = Logical.OR) |
| | | @Log(title = "【集团用户申请】添加集团用户申请", businessType = BusinessType.INSERT) |
| | | @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "后台添加集团用户申请") |
| | | @PostMapping(value = "/back/add") |
| | |
| | | // 用户id |
| | | return AjaxResult.ok(enterpriseUserApplicationService.save(dto)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/groupUserApplication"}, logical = Logical.OR) |
| | | @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "集团用户列表") |
| | | @PostMapping(value = "/page") |
| | | public R<Page<TEnterpriseUserApplication>> page(@RequestBody EnterpriseQuery enterpriseQuery) { |
| | |
| | | // 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())); |
| | | Page<TEnterpriseUserApplication> page = enterpriseUserApplicationService.lambdaQuery().eq(enterpriseQuery.getPhone()!=null&&enterpriseQuery.getPhone()!="",TEnterpriseUserApplication::getPhone,enterpriseQuery.getPhone()).orderByDesc(BasePojo::getCreateTime).page(Page.of(enterpriseQuery.getPageCurr(), enterpriseQuery.getPageSize())); |
| | | return R.ok(page); |
| | | // } |
| | | } |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/groupUserApplication/export"}, logical = Logical.OR) |
| | | @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(); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/groupUserApplication/remark"}, logical = Logical.OR) |
| | | @Log(title = "【集团用户申请】填写备注", businessType = BusinessType.INSERT) |
| | | @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "备注") |
| | | @PostMapping(value = "/remark") |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/groupUserApplication/del"}, logical = Logical.OR) |
| | | @Log(title = "【集团用户申请】删除申请数据", businessType = BusinessType.DELETE) |
| | | @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "删除") |
| | | @DeleteMapping(value = "/delete") |