消除数据维护的待办逻辑新增校验是否维护完
This commit is contained in:
parent
7eae9974f8
commit
9f66704e53
@ -32,6 +32,7 @@ import java.io.IOException;
|
|||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -385,9 +386,11 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
|
|||||||
* @param engineParamDetailPojos
|
* @param engineParamDetailPojos
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void updateParamValue(List<EngineParamDetailPojo> engineParamDetailPojos,String currentUserId) {
|
public void updateParamValue(List<EngineParamDetailPojo> engineParamDetailPojos, String currentUserId) {
|
||||||
// String currentUserId = runtimeAppContextService.getCurrentUserId();
|
// String currentUserId = runtimeAppContextService.getCurrentUserId();
|
||||||
|
if (ObjectUtils.isEmpty(engineParamDetailPojos)) {
|
||||||
|
throw new RuntimeException("集合为空,请检查");
|
||||||
|
}
|
||||||
for (EngineParamDetailPojo engineParamDetailPojo : engineParamDetailPojos) {
|
for (EngineParamDetailPojo engineParamDetailPojo : engineParamDetailPojos) {
|
||||||
|
|
||||||
//通过操作状态对应不同操作新增和更新都新增数据为小版本且为草稿状态
|
//通过操作状态对应不同操作新增和更新都新增数据为小版本且为草稿状态
|
||||||
@ -416,20 +419,27 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
|
|||||||
} else if (engineParamDetailPojo.getOperation().equals(String.valueOf(ParamOperation.INSERT))) {
|
} else if (engineParamDetailPojo.getOperation().equals(String.valueOf(ParamOperation.INSERT))) {
|
||||||
|
|
||||||
}
|
}
|
||||||
//填写后消除待办
|
}
|
||||||
String id = engineParamDetailPojo.getId();
|
EngineParamDetailPojo engineParamDetailPojo = engineParamDetailPojos.get(0);
|
||||||
EngineParamDetailPojo engineParamDetailPojo1 = selectById(id);
|
List<EngineParamDetailPojo> pojoList = selectByModelNewVersion(engineParamDetailPojo.getEngineModelId());
|
||||||
String filledBy = engineParamDetailPojo1.getFilledBy();
|
Stream<EngineParamDetailPojo> paramDetailPojoStream = pojoList.stream().filter(x -> {
|
||||||
if (ObjectUtils.isNotEmpty(filledBy)) {
|
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")
|
sw.buildFromDatasource("xdap_app_223770822127386625")
|
||||||
.update("is_delete", 1)
|
.update("is_delete", 1)
|
||||||
.update("last_update_date", new Date())
|
.update("last_update_date", new Date())
|
||||||
.eq("owner_id", filledBy)
|
.eq("owner_id", currentUserId)
|
||||||
.eq("process_title", "数据维护")
|
.eq("process_title", "数据维护")
|
||||||
.doUpdate(TodoTaskPojo.class);
|
.doUpdate(TodoTaskPojo.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//应该不会有新增参数 要不然还要给参数绑定部门,责任人,填写人
|
//应该不会有新增参数 要不然还要给参数绑定部门,责任人,填写人
|
||||||
// EngineParamDetailPojo ei = new EngineParamDetailPojo();
|
// EngineParamDetailPojo ei = new EngineParamDetailPojo();
|
||||||
//
|
//
|
||||||
@ -441,7 +451,7 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
|
|||||||
//
|
//
|
||||||
// insertDetails.add(ei);
|
// insertDetails.add(ei);
|
||||||
|
|
||||||
}
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//// -----------------------------------------------------
|
//// -----------------------------------------------------
|
||||||
@ -528,7 +538,7 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
|
|||||||
List<EngineParamDetailPojo> detailPojos = selectByResId(userID);
|
List<EngineParamDetailPojo> detailPojos = selectByResId(userID);
|
||||||
List<EngineParamDetailPojo> paramDetailPojos = detailPojos.stream()
|
List<EngineParamDetailPojo> paramDetailPojos = detailPojos.stream()
|
||||||
.filter(x -> x.getEngineModelId().equals(engineModelId) && ObjectUtils.isEmpty(x.getFilledBy())).collect(Collectors.toList());
|
.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")
|
sw.buildFromDatasource("xdap_app_223770822127386625")
|
||||||
.eq("owner_id", userID)
|
.eq("owner_id", userID)
|
||||||
@ -585,13 +595,13 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
|
|||||||
.in("id", pIds)
|
.in("id", pIds)
|
||||||
.doQuery(Parameter.class);
|
.doQuery(Parameter.class);
|
||||||
//不需要TC数据来源的参数
|
//不需要TC数据来源的参数
|
||||||
parameterList = parameterList.stream().filter(x->{
|
parameterList = parameterList.stream().filter(x -> {
|
||||||
if (ObjectUtils.isEmpty(x.getParameterSource())){
|
if (ObjectUtils.isEmpty(x.getParameterSource())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ("TC分类表".equals(x.getParameterSource())) {
|
if ("TC分类表".equals(x.getParameterSource())) {
|
||||||
return false;
|
return false;
|
||||||
}else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user