From 7e2f3abca2f5bb83459f809b8e7195b361e0a372 Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Sat, 07 Oct 2023 12:00:30 +0800
Subject: [PATCH] ci:补充提交
---
screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java
index a2259b6..61cb019 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java
@@ -16,8 +16,12 @@
import com.moral.api.service.AllocationExtensionService;
import com.moral.api.service.AllocationService;
import com.moral.api.service.FileTableService;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
/**
* <p>
@@ -30,11 +34,11 @@
@Service
public class AllocationExtensionServiceImpl extends ServiceImpl<AllocationExtensionMapper, AllocationExtension> implements AllocationExtensionService {
- private final AllocationService allocationService;
+ @Autowired
+ private AllocationService allocationService;
private final FileTableService fileTableService;
- public AllocationExtensionServiceImpl(AllocationService allocationService, FileTableService fileTableService) {
- this.allocationService = allocationService;
+ public AllocationExtensionServiceImpl( FileTableService fileTableService) {
this.fileTableService = fileTableService;
}
@@ -63,7 +67,20 @@
@Override
public Page<AllocationExtensionPageExt> extPage(AllocationExtensionPageCond allocationExtensionPageCond) {
- return this.baseMapper.extPage(allocationExtensionPageCond.getPage().convertPage(), allocationExtensionPageCond);
+ List<Integer> unitList = allocationService.unitResult();
+ allocationExtensionPageCond.setUnitList(unitList);
+ Integer codeId = allocationService.unitAreaCode();
+ Page<AllocationExtensionPageExt> page = this.baseMapper.extPage(allocationExtensionPageCond.getPage().convertPage(), allocationExtensionPageCond);
+ if(CollectionUtils.isNotEmpty(page.getRecords())){
+ page.getRecords().forEach(it->{
+ if((CollectionUtils.isEmpty(unitList)&&codeId.equals(1))||codeId.equals(2)){
+ it.setIsApprove(1);
+ }else {
+ it.setIsApprove(0);
+ }
+ });
+ }
+ return page;
}
@Override
--
Gitblit v1.8.0