公式参数

This commit is contained in:
钱涛 2022-04-20 11:31:55 +08:00
parent 643160e714
commit d2ba2c3afe
3 changed files with 50 additions and 0 deletions

View File

@ -27,6 +27,14 @@ public class SalaryFormulaBO {
.id(e.getId())
.name(e.getName())
.formula(e.getFormula())
.description(e.getDescription())
.extendParam(e.getExtendParam())
.module(e.getModule())
.parameters(e.getParameters())
.referenceType(e.getReferenceType())
.returnType(e.getReturnType())
.useFor(e.getUseFor())
.validateType(e.getValidateType())
.build())
.collect(Collectors.toList());
}

View File

@ -1,10 +1,14 @@
package com.engine.salary.entity.salaryformula.dto;
import com.engine.salary.entity.salaryformula.po.FormulaVar;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 薪酬管理公式
* <p>Copyright: Copyright (c) 2022</p>
@ -27,4 +31,39 @@ public class ExpressFormulaDTO {
//公式表达式
private String formula;
/**
* 备注
*/
private String description;
/**
* 模块
*/
@DataCheck(require = true,message = "模块为空")
private String module;
/**
* 用途
*/
private String useFor;
/**
* 引用类型
*/
private String referenceType;
/**
* 返回类型
*/
private String returnType;
/**
* 校验类型
*/
private String validateType;
/**
* 扩展参数
*/
private String extendParam;
private List<FormulaVar> parameters;
}

View File

@ -66,6 +66,9 @@ public class SalaryFormulaWrapper extends Service {
if (CollectionUtils.isEmpty(expressFormulas)) {
throw new SalaryRunTimeException("获取公式详情失败");
}
return SalaryFormulaBO.convert2DTO(expressFormulas).get(0);
}