From 9f66704e53526eb831ad4834ac56d9dc0227350b Mon Sep 17 00:00:00 2001
From: "ys.git" <18439391935@163.com>
Date: Tue, 16 Dec 2025 10:15:48 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E9=99=A4=E6=95=B0=E6=8D=AE=E7=BB=B4?=
=?UTF-8?q?=E6=8A=A4=E7=9A=84=E5=BE=85=E5=8A=9E=E9=80=BB=E8=BE=91=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=A0=A1=E9=AA=8C=E6=98=AF=E5=90=A6=E7=BB=B4=E6=8A=A4?=
=?UTF-8?q?=E5=AE=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/EngineParamDetailServiceImpl.java | 52 +++++++++++--------
1 file changed, 31 insertions(+), 21 deletions(-)
diff --git a/src/main/java/com/xdap/self_development/service/impl/EngineParamDetailServiceImpl.java b/src/main/java/com/xdap/self_development/service/impl/EngineParamDetailServiceImpl.java
index 8e0b884..4b1a065 100644
--- a/src/main/java/com/xdap/self_development/service/impl/EngineParamDetailServiceImpl.java
+++ b/src/main/java/com/xdap/self_development/service/impl/EngineParamDetailServiceImpl.java
@@ -32,6 +32,7 @@ import java.io.IOException;
import java.net.URLEncoder;
import java.util.*;
import java.util.stream.Collectors;
+import java.util.stream.Stream;
/**
*
@@ -385,9 +386,11 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
* @param engineParamDetailPojos
*/
@Override
- public void updateParamValue(List engineParamDetailPojos,String currentUserId) {
+ public void updateParamValue(List engineParamDetailPojos, String currentUserId) {
// String currentUserId = runtimeAppContextService.getCurrentUserId();
-
+ if (ObjectUtils.isEmpty(engineParamDetailPojos)) {
+ throw new RuntimeException("集合为空,请检查");
+ }
for (EngineParamDetailPojo engineParamDetailPojo : engineParamDetailPojos) {
//通过操作状态对应不同操作新增和更新都新增数据为小版本且为草稿状态
@@ -416,21 +419,28 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
} else if (engineParamDetailPojo.getOperation().equals(String.valueOf(ParamOperation.INSERT))) {
}
- //填写后消除待办
- String id = engineParamDetailPojo.getId();
- EngineParamDetailPojo engineParamDetailPojo1 = selectById(id);
- String filledBy = engineParamDetailPojo1.getFilledBy();
- if (ObjectUtils.isNotEmpty(filledBy)) {
- sw.buildFromDatasource("xdap_app_223770822127386625")
- .update("is_delete", 1)
- .update("last_update_date", new Date())
- .eq("owner_id", filledBy)
- .eq("process_title", "数据维护")
- .doUpdate(TodoTaskPojo.class);
+ }
+ EngineParamDetailPojo engineParamDetailPojo = engineParamDetailPojos.get(0);
+ List pojoList = selectByModelNewVersion(engineParamDetailPojo.getEngineModelId());
+ Stream paramDetailPojoStream = pojoList.stream().filter(x -> {
+ if (ObjectUtils.isEmpty(x.getFilledBy())) {
+ return false;
}
-
-
- //应该不会有新增参数 要不然还要给参数绑定部门,责任人,填写人
+ if (x.getFilledBy().equals(currentUserId) && ObjectUtils.isEmpty(x.getMinorVersion())) {
+ return true;
+ }
+ return false;
+ });
+ //填写后检查是否完全填写完成用来消除待办
+ if (ObjectUtils.isNotEmpty(paramDetailPojoStream)) {
+ sw.buildFromDatasource("xdap_app_223770822127386625")
+ .update("is_delete", 1)
+ .update("last_update_date", new Date())
+ .eq("owner_id", currentUserId)
+ .eq("process_title", "数据维护")
+ .doUpdate(TodoTaskPojo.class);
+ }
+ //应该不会有新增参数 要不然还要给参数绑定部门,责任人,填写人
// EngineParamDetailPojo ei = new EngineParamDetailPojo();
//
// BeanUtils.copyProperties(engineParamDetailPojo, ei,"id","majorVersion");
@@ -441,7 +451,7 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
//
// insertDetails.add(ei);
- }
+
//
//
//// -----------------------------------------------------
@@ -528,7 +538,7 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
List detailPojos = selectByResId(userID);
List paramDetailPojos = detailPojos.stream()
.filter(x -> x.getEngineModelId().equals(engineModelId) && ObjectUtils.isEmpty(x.getFilledBy())).collect(Collectors.toList());
- if (ObjectUtils.isEmpty(paramDetailPojos)||paramDetailPojos.isEmpty()) {
+ if (ObjectUtils.isEmpty(paramDetailPojos) || paramDetailPojos.isEmpty()) {
//软删除这个代办人的任务
sw.buildFromDatasource("xdap_app_223770822127386625")
.eq("owner_id", userID)
@@ -585,13 +595,13 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
.in("id", pIds)
.doQuery(Parameter.class);
//不需要TC数据来源的参数
- parameterList = parameterList.stream().filter(x->{
- if (ObjectUtils.isEmpty(x.getParameterSource())){
+ parameterList = parameterList.stream().filter(x -> {
+ if (ObjectUtils.isEmpty(x.getParameterSource())) {
return false;
}
if ("TC分类表".equals(x.getParameterSource())) {
return false;
- }else {
+ } else {
return true;
}
}).collect(Collectors.toList());