From 21e470b11f8533ee74092a278a23dae42eaf4f93 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期一, 13 一月 2025 15:59:16 +0800 Subject: [PATCH] 监听器注入字段单位换为天 --- business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java index 8191b18..1210f57 100644 --- a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java +++ b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java @@ -40,6 +40,7 @@ import com.ycl.mapper.*; import com.ycl.service.FileService; import com.ycl.service.ProjectInfoService; +import com.ycl.system.mapper.SysDeptMapper; import lombok.RequiredArgsConstructor; import org.apache.commons.codec.Charsets; import org.springframework.stereotype.Service; @@ -88,6 +89,7 @@ private final ProjectInvestmentFundingServiceImpl projectInvestmentFundingServiceImpl; private final ProjectInvestmentPolicyComplianceServiceImpl projectInvestmentPolicyComplianceServiceImpl; private final ProjectUnitRegistrationInfoServiceImpl projectUnitRegistrationInfoServiceImpl; + private final SysDeptMapper sysDeptMapper; /** * 娣诲姞 @@ -227,13 +229,25 @@ return Result.ok().data(list).total(0); } + Long userId = SecurityUtils.getUserId(); + String ancestors = sysDeptMapper.selectAncestors(userId); + String[] ancestorArr = ancestors.split(","); + for (String ancestor : ancestorArr) { + if ("101".equals(ancestor)) { // 涓氫富 + query.setCreateBy(userId); + query.setRole(0); + }else if ("102".equals(ancestor)){ // 瀹℃壒 + query.setUsedStatus(1); + query.setRole(1); + } + } + IPage<ProjectInfoVO> page = PageUtil.getPage(query, ProjectInfoVO.class); baseMapper.getPage(page, query); List<ProjectInfoVO> records = page.getRecords(); List<ProjectVO> list = new ArrayList<>(); records.forEach(vo -> { ProjectInfoVO.transform(vo); - vo.setProjectColorCode("green"); ProjectVO projectVO = new ProjectVO(); copyToProjectVO(vo, projectVO); //缈昏瘧椤圭洰闃舵 -- Gitblit v1.8.0