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/AllocationServiceImpl.java | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 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 b363f05..7a8b8f9 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
@@ -472,8 +472,19 @@
@Override
public Page<AllocationPageExt> extPage(AllocationPageCond allocationPageCond) {
List<Integer> unitList = unitResult();
+ Integer codeId = unitAreaCode();
allocationPageCond.setUnitList(unitList);
- return this.baseMapper.extPage(allocationPageCond.getPage().convertPage(), allocationPageCond);
+ Page<AllocationPageExt> page = this.baseMapper.extPage(allocationPageCond.getPage().convertPage(), allocationPageCond);
+ 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
@@ -591,6 +602,7 @@
}
AllocationExtension allocationExtension = allocationExtensionAddCond.convert();
allocationExtension.setState(AllocationExtensionApproveEnum.APPLYING.value);
+ allocationExtension.setExtensionOldNum(allocationExt.getChangeDay());
allocationExtensionService.save(allocationExtension);
fileTableService.upDateResult(allocationExtensionAddCond.getFileList(),allocationExtension.getId(), FileTableEnum.ALLOCATION_EXTENSION.value);
return true;
@@ -610,4 +622,22 @@
}
return Arrays.asList(0);
}
+
+ @Override
+ public Integer unitAreaCode() {
+ QxUser user = UserHelper.getCurrentUser();
+ List<Integer> userList = responsibilityUnitMapper.selectCodeList("JBD",user.getUserId());
+ if(CollectionUtils.isNotEmpty(userList)){
+ return 1;
+ }
+ if(Objects.nonNull(user.getUnitId())){
+ String code = responsibilityUnitMapper.selectAreaCode(user.getUnitId());
+ if(code.length()>6){
+ return 0;
+ }else {
+ return 2;
+ }
+ }
+ return 1;
+ }
}
--
Gitblit v1.8.0