|
@@ -373,7 +373,8 @@ public class FormulaController {
|
|
|
Map<String, Object> result = new LinkedHashMap<>();
|
|
|
String key = fo.getKey().replaceAll("__[\\d_]+", "");
|
|
|
ContractInfo contract = this.contractInfoService.getById(fo.getContractId());
|
|
|
- List<KeyMapper> kms = this.service.getKeyMapperList(Collections.singletonList(fo.getPkeyId()), contract.getPId(), "", ExecuteType.INSPECTION);
|
|
|
+ WbsTreeContract parent = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getId,fo.getParentId()).eq(WbsTreeContract::getContractId,fo.getContractId()).last("limit 1"));
|
|
|
+ List<KeyMapper> kms = this.service.getKeyMapperList(Collections.singletonList(fo.getPkeyId()), contract.getPId(), parent.getPKeyId().toString(), ExecuteType.INSPECTION);
|
|
|
KeyMapper keyMapper = null;
|
|
|
if (Func.isNotEmpty(kms)) {
|
|
|
Optional<KeyMapper> optionalKeyMapper = kms.stream().filter(e -> StringUtils.isEquals(e.getField(), key)).findFirst();
|