From 86e6fdd16902a45921d255e1f40ba5dc6f115aa6 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: Thu, 03 Apr 2025 10:39:30 +0800
Subject: [PATCH] 逻辑调整
---
src/main/java/com/gkhy/labRiskManage/domain/experiment/service/impl/ExperimentInfoServiceImpl.java | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/gkhy/labRiskManage/domain/experiment/service/impl/ExperimentInfoServiceImpl.java b/src/main/java/com/gkhy/labRiskManage/domain/experiment/service/impl/ExperimentInfoServiceImpl.java
index c32183a..d4768ab 100644
--- a/src/main/java/com/gkhy/labRiskManage/domain/experiment/service/impl/ExperimentInfoServiceImpl.java
+++ b/src/main/java/com/gkhy/labRiskManage/domain/experiment/service/impl/ExperimentInfoServiceImpl.java
@@ -43,6 +43,7 @@
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
@@ -203,8 +204,8 @@
BeanUtils.copyProperties(experimentAppInsertBO, experimentInfo);
experimentInfo.setStagingTag(ExperimentStagingEnum.NOT_SAVE.getValue());
experimentInfo.setDeleteStatus(StatusEnum.DELETE_NOT.getCode().byteValue());
- experimentInfo.setLiabilityUser(operator.getName());
- experimentInfo.setLiabilityUserId(currentUserId);
+ experimentInfo.setLiabilityUser(experimentAppInsertBO.getLiabilityUser());
+ experimentInfo.setLiabilityUserId(experimentAppInsertBO.getLiabilityUserId());
experimentInfo.setStage(ExperimentStageEnum.NOT_EVALUATION.getValue());
experimentInfo.setStatus(ExperimentStatusEnum.NOT_APPLY.getValue());
experimentInfo.setExperimentTag(ExperimentTagEnum.NEW_CREATE.getValue());
@@ -356,8 +357,10 @@
BeanUtils.copyProperties(experimentAppInsertBO, experimentInfo);
experimentInfo.setStagingTag(ExperimentStagingEnum.NOT_SAVE.getValue());
experimentInfo.setDeleteStatus(StatusEnum.DELETE_NOT.getCode().byteValue());
- experimentInfo.setLiabilityUserId(currentUserId);
- experimentInfo.setLiabilityUser(operator.getName());
+ experimentInfo.setLiabilityUserId(experimentAppInsertBO.getLiabilityUserId());
+ experimentInfo.setLiabilityUser(experimentAppInsertBO.getLiabilityUser());
+// experimentInfo.setLiabilityUserId(currentUserId);
+// experimentInfo.setLiabilityUser(operator.getName());
experimentInfo.setStage(ExperimentStageEnum.NOT_EVALUATION.getValue());
experimentInfo.setStatus(ExperimentStatusEnum.NOT_APPLY.getValue());
experimentInfo.setExperimentTag(ExperimentTagEnum.AREADLY_DEVELOP.getValue());
@@ -618,15 +621,17 @@
if (!ObjectUtils.isEmpty(queryBO.getAssessLevel())){
predicateList.add(criteriaBuilder.in(root.get("id")).value(ids));
}
- if(roleTag == UserTagEnum.USER_TAG_0.getCode()){
+ if(roleTag == UserTagEnum.USER_TAG_0.getCode() || roleTag == UserTagEnum.USER_TAG_1.getCode()){
Join<ExperimentInfo, RiskAssessPlan> experimentJion = root.join("riskAssessPlans", JoinType.LEFT);
+ //criteriaBuilder.equal(root.get("liabilityUserId"), currentUserId),
predicateList.add(criteriaBuilder.or(
- criteriaBuilder.equal(root.get("liabilityUserId"), currentUserId),
+ criteriaBuilder.equal(root.get("safeLiabilityUserId"), currentUserId),
criteriaBuilder.equal(experimentJion.get("identificationUserId"), currentUserId),
criteriaBuilder.equal(experimentJion.get("evaluateUserId"), currentUserId))
);
query.groupBy(root.get("id"));
}
+
if (!ObjectUtils.isEmpty(ExperimentTypeEnum.prase(queryBO.getExperimentType()))){
Join<ExperimentInfo, ExperimentAndType> typeJoin = root.join("types", JoinType.LEFT);
predicateList.add(criteriaBuilder.equal(typeJoin.get("typeId"), queryBO.getExperimentType()));
--
Gitblit v1.9.2