|
@@ -44,6 +44,7 @@ import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.zjugis.business.constants.FlowStatusConstants.*;
|
|
|
+import static com.zjugis.framework.common.util.collection.CollectionUtils.convertSet;
|
|
|
|
|
|
/**
|
|
|
* @author jzh
|
|
@@ -229,12 +230,13 @@ public class ResignEvent extends BaseController {
|
|
|
List<Map<String, String>> userMaps = new ArrayList<>();
|
|
|
List<ResignDetailDO> detailDOS = resignDetailService.getListByResignId(entity.getId());
|
|
|
if (CollectionUtil.isNotEmpty(detailDOS)) {
|
|
|
+ Set<String> ids = convertSet(detailDOS, ResignDetailDO::getReceiver);
|
|
|
|
|
|
|
|
|
- detailDOS.forEach(v -> {
|
|
|
+ ids.forEach(v -> {
|
|
|
HashMap<String, String> map = new HashMap<>();
|
|
|
- if (v.getReceiver() != null) {
|
|
|
- map.put("id", v.getReceiver());
|
|
|
+ if (v != null) {
|
|
|
+ map.put("id", v);
|
|
|
userMaps.add(map);
|
|
|
}
|
|
|
});
|
|
@@ -257,9 +259,10 @@ public class ResignEvent extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 判断是否存在
|
|
|
+ * 必须返回true 才会继续往下流转
|
|
|
*/
|
|
|
- @PostMapping("/exist")
|
|
|
- public String exist(@ParamModel Map flowInstance) {
|
|
|
+ @PostMapping("/exist/{type}")
|
|
|
+ public String exist(@ParamModel Map flowInstance, @PathVariable String type) {
|
|
|
try {
|
|
|
String flowInstanceId = flowInstance.get("id").toString();
|
|
|
|
|
@@ -267,14 +270,23 @@ public class ResignEvent extends BaseController {
|
|
|
List<ResignDetailDO> detailDOS = resignDetailService.getListByResignId(entity.getId());
|
|
|
|
|
|
|
|
|
- System.out.println(detailDOS.size());
|
|
|
- if (CollectionUtil.isNotEmpty(detailDOS)) {
|
|
|
- return "true";
|
|
|
- } else {
|
|
|
- return "false";
|
|
|
+ switch (type) {
|
|
|
+ case "1":
|
|
|
+ if (CollectionUtil.isNotEmpty(detailDOS)) {
|
|
|
+ return "true";
|
|
|
+ } else {
|
|
|
+ return "false";
|
|
|
+ }
|
|
|
+ case "2":
|
|
|
+ if (CollectionUtil.isNotEmpty(detailDOS)) {
|
|
|
+ return "false";
|
|
|
+ } else {
|
|
|
+ return "true";
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ return "false";
|
|
|
}
|
|
|
|
|
|
-
|
|
|
} catch (Exception ex) {
|
|
|
return error(ex.getMessage(), ErrorCode.DEFAULT);
|
|
|
}
|