From c5db1b5a99d9e7bdec54b2dbf2fb43ba30c503db Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Wed, 27 Sep 2023 11:29:16 +0800
Subject: [PATCH] feat:补充提交
---
screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
index 35a76ce..2a0cad4 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
@@ -18,6 +18,7 @@
import com.moral.api.service.AllocationExtensionService;
import com.moral.api.service.ApproveTableService;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
@@ -69,9 +70,9 @@
@Autowired
private SysDictTypeMapper sysDictTypeMapper;
@Autowired
- private SysDictDataMapper sysDictDataMapper;
- @Autowired
private ResponsibilityUnitMapper responsibilityUnitMapper;
+ @Autowired
+ private SysDictDataMapper sysDictDataMapper;
@Autowired
private RedisTemplate redisTemplate;
@Autowired
@@ -455,6 +456,8 @@
@Override
public Page<AllocationPageExt> extPage(AllocationPageCond allocationPageCond) {
+ List<Integer> unitList = unitResult();
+ allocationPageCond.setUnitList(unitList);
return this.baseMapper.extPage(allocationPageCond.getPage().convertPage(), allocationPageCond);
}
@@ -576,4 +579,19 @@
fileTableService.upDateResult(allocationExtensionAddCond.getFileList(),allocationExtension.getId(), FileTableEnum.ALLOCATION_EXTENSION.value);
return true;
}
+
+ @Override
+ public List<Integer> unitResult() {
+ QxUser user = UserHelper.getCurrentUser();
+ Integer unitId = Objects.nonNull(user.getUnitId())?user.getUnitId():0;
+ List<Integer> userList = responsibilityUnitMapper.selectCodeList("JBD",user.getUserId());
+ if(CollectionUtils.isNotEmpty(userList)){
+ return new ArrayList<>();
+ }
+ userList = responsibilityUnitMapper.selectResultList(unitId);
+ if(CollectionUtils.isNotEmpty(userList)){
+ return userList;
+ }
+ return Arrays.asList(0);
+ }
}
--
Gitblit v1.8.0