yangyj 2 سال پیش
والد
کامیت
18655f3085

+ 2 - 1
blade-service/blade-manager/src/main/java/com/mixsmart/utils/CustomFunction.java

@@ -319,7 +319,8 @@ public class CustomFunction {
 		return "";
 	}
 
-	public static Object count(List<Object> list) {
+	public static Object count(Object data) {
+		List<Object> list=obj2ListNe(data);
 		if(ListUtils.isNotEmpty(list)){
 			return   list.stream().filter(StringUtils::isNumber).map(StringUtils::handleNull).mapToDouble(Double::parseDouble).count();
 		}

+ 3 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsParamServiceImpl.java

@@ -64,6 +64,9 @@ public class WbsParamServiceImpl extends BaseServiceImpl<WbsParamMapper, WbsPara
     @Override
     public List<WbsTreeContract> chain(Long contractId ,Long id, Long pkId,WbsTreeContract wbsTreeContract) {
         List<WbsTreeContract> nodes = treeContractService.searchParentAllNode(id,contractId);
+        if(Func.isEmpty(nodes)&&wbsTreeContract!=null){
+            nodes=treeContractService.searchParentAllNode(wbsTreeContract.getId(),contractId);
+        }
         if(Func.isNotEmpty(nodes)) {
             if(pkId!=null&&wbsTreeContract==null) {
                 wbsTreeContract = treeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, pkId));