From 78c1f87d61d1411356a422ab841afde67342d228 Mon Sep 17 00:00:00 2001 From: wangwh <2397901735@qq.com> Date: Wed, 04 Sep 2024 20:52:15 +0800 Subject: [PATCH] 1、事项登记、详情查询接口 2、ocr识别文字接口 3、办理流转-查询下属人员、选择经办人、获取工作人员信息、添加办理反馈、获取办理反馈信息、修改办理反馈信息 4、督办-添加督办、回复督办、查询督办列表 5、查询评价 --- dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtPostWebController.java | 40 +++++++++++++++++++++++++++++++++------- 1 files changed, 33 insertions(+), 7 deletions(-) diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtPostWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtPostWebController.java index b283aa8..72b2120 100644 --- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtPostWebController.java +++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtPostWebController.java @@ -1,9 +1,13 @@ -package cn.huge.module.ctuser.controller; +package cn.huge.module.ctuser.controller.web; import cn.huge.base.common.utils.ReturnFailUtils; import cn.huge.base.common.utils.ReturnSucUtils; +import cn.huge.base.config.CurrentUser; import cn.huge.module.ctuser.domain.po.CtPost; +import cn.huge.module.ctuser.domain.po.CtUser; import cn.huge.module.ctuser.service.CtPostService; +import cn.huge.module.ctuser.service.CtUserService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -14,13 +18,12 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; +import java.util.List; import java.util.Map; -import java.util.stream.Collectors; -import java.util.stream.Stream; /** - * @title: 客户岗位表接口api - * @description: 客户岗位表接口api + * @title: 客户岗位表接口api-web端 + * @description: 客户岗位表接口api-web端 * @company: hugeinfo * @author: liyj * @time: 2024-08-19 20:04:19 @@ -36,6 +39,9 @@ @Autowired private CtPostService service; + + @Autowired + private CtUserService ctUserService; /** * 获取请求URL参数 @@ -63,7 +69,7 @@ if (StringUtils.isNotBlank(unitId)){ terms.put("unitId", unitId); } - // 删除状态,0:已删除,1:未删除 + // 删除状态,0:未删除,1:已删除 String deleteStatus = request.getParameter("deleteStatus"); if (StringUtils.isNotBlank(deleteStatus)){ terms.put("deleteStatus", deleteStatus); @@ -143,7 +149,7 @@ /** * 根据主键单个 * @url {ctx}/api/web/ctPost/deleteById - * @param ids 主键编号 + * @param id 主键编号 * @return Object */ @GetMapping("/deleteById") @@ -172,4 +178,24 @@ } } + /** + * 根据单位编号查询所有岗位 + * @url {ctx}/api/web/ctPost/getByUnitId + * @param userId 登录用户编号 + * @return Object + * @throws Exception + */ + @GetMapping("/getByUnitId") + public Object getByUnitId(@CurrentUser String userId) { + try { + // 获取当前登录用户 + CtUser ctUser = ctUserService.getById(userId); + QueryWrapper<CtPost> ctPostQueryWrapper = new QueryWrapper<>(); + ctPostQueryWrapper.eq("unit_id", ctUser.getUnitId()); + List<CtPost> ctPostList = service.list(ctPostQueryWrapper); + return ReturnSucUtils.getRepInfo(ctPostList); + } catch (Exception e) { + return ReturnFailUtils.getRepInfo(); + } + } } -- Gitblit v1.8.0