|
@@ -348,7 +348,7 @@ 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());
|
|
|
+ List<KeyMapper> kms = this.service.getKeyMapperList(Collections.singletonList(fo.getPkeyId()),contract.getPId());
|
|
|
KeyMapper keyMapper=null;
|
|
|
if(Func.isNotEmpty(kms)){
|
|
|
Optional<KeyMapper> optionalKeyMapper= kms.stream().filter(e->StringUtils.isEquals(e.getField(),key)).findFirst();
|
|
@@ -358,7 +358,7 @@ public class FormulaController {
|
|
|
}
|
|
|
if(keyMapper!=null&&Func.isNotEmpty(keyMapper.getFormulaId())){
|
|
|
Formula formula = this.service.getById(keyMapper.getFormulaId());
|
|
|
- String data = this.formulaOptionService.queryOption(fo.getContractId(),fo.getParentId(),fo.getPKeyId(),fo.getKey());
|
|
|
+ String data = this.formulaOptionService.queryOption(fo.getContractId(),fo.getParentId(),fo.getPkeyId(),fo.getKey());
|
|
|
/*临时处理,等确定数据结构在优化*/
|
|
|
if(formula.getFormula().contains(".option")){
|
|
|
return R.data(createRadioPanel(0,"是否引用公式数据",data));
|
|
@@ -388,8 +388,7 @@ public class FormulaController {
|
|
|
@ApiOperationSupport(order = 10)
|
|
|
@ApiOperation(value = "公式交互面板参数保存", notes = "公式交互面板参数保存")
|
|
|
public R<Object> panelSave( @RequestBody FormulaOptionVo fo){
|
|
|
-
|
|
|
- return R.success("保存成功");
|
|
|
+ return R.data(this.formulaOptionService.saveOrUpdateOption(fo));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/log")
|