From b80d83cd8fbb32c8cd39c14a8c3ec1ed3da02ebe Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Tue, 23 Apr 2024 08:43:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AF=84=E5=88=86=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/ApplyInfoListManager.java | 20 ++++++++++++++++++- .../controller/manager/ScoreInfoManager.java | 3 ++- .../hyp/system/domain/vo/ApplyInfoListVO.java | 4 ++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ApplyInfoListManager.java b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ApplyInfoListManager.java index d06619f..264af9a 100644 --- a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ApplyInfoListManager.java +++ b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ApplyInfoListManager.java @@ -9,6 +9,7 @@ import com.hyp.common.exception.ServiceException; import com.hyp.common.utils.SecurityUtils; import com.hyp.system.domain.RewApplyInfoList; import com.hyp.system.domain.RewFileRelation; +import com.hyp.system.domain.RewScoreInfo; import com.hyp.system.domain.dto.ApplyInfoListDTO; import com.hyp.system.domain.dto.ApplyInfoListSaveDTO; import com.hyp.system.domain.vo.ApplyInfoListVO; @@ -74,7 +75,24 @@ public class ApplyInfoListManager { public List selectScoreInfoList(ApplyInfoListDTO applyInfoListDTO){ - return applyInfoListService.selectApplyInfoList(applyInfoListDTO); + List applyInfoListVOS = applyInfoListService.selectApplyInfoList(applyInfoListDTO); + applyInfoListVOS.forEach(applyInfoListVO -> { + if (!SysUser.isAdmin(SecurityUtils.getUserId())) { + Integer count = scoreInfoService.lambdaQuery() + .eq(RewScoreInfo::getApplyId, applyInfoListVO.getApplyId()) + .eq(RewScoreInfo::getCreateId, SecurityUtils.getUserId()).count(); + if (count > 0) { + applyInfoListVO.setScoreStatus(1); + } + } else if (SysUser.isAdmin(SecurityUtils.getUserId())) { + Integer count = scoreInfoService.lambdaQuery() + .eq(RewScoreInfo::getApplyId, applyInfoListVO.getApplyId()).count(); + if (count > 0) { + applyInfoListVO.setScoreStatus(1); + } + } + }); + return applyInfoListVOS; } /** diff --git a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java index 90a314f..c9a8b80 100644 --- a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java +++ b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java @@ -58,7 +58,8 @@ public class ScoreInfoManager { rewScoreInfo.setCreateTime(new Date()); rewScoreInfo.setCreateBy(loginUser.getUsername()); } - return scoreInfoService.saveOrUpdate(rewScoreInfo); + scoreInfoService.saveOrUpdate(rewScoreInfo); + return submit(rewScoreInfo.getApplyId()); } diff --git a/hyp-system/src/main/java/com/hyp/system/domain/vo/ApplyInfoListVO.java b/hyp-system/src/main/java/com/hyp/system/domain/vo/ApplyInfoListVO.java index 105d95c..0fd6e13 100644 --- a/hyp-system/src/main/java/com/hyp/system/domain/vo/ApplyInfoListVO.java +++ b/hyp-system/src/main/java/com/hyp/system/domain/vo/ApplyInfoListVO.java @@ -68,6 +68,10 @@ public class ApplyInfoListVO extends BaseEntity { private Long createId; + + private Integer scoreStatus = 0; + + /** * ζ–‡δ»Άι›†εˆ */