|
@@ -11,7 +11,7 @@ import (
|
|
|
)
|
|
|
|
|
|
|
|
|
-func AddPredictEdbInfo(sourceEdbInfoId, classifyId int, edbName string, ruleList []models.RuleConfig, sysUserId int, sysUserName string) (edbInfo *models.EdbInfo, err error, errMsg string) {
|
|
|
+func AddPredictEdbInfo(sourceEdbInfoId, classifyId int, edbName string, ruleList []models.RuleConfig, minValue, maxValue float64, sysUserId int, sysUserName string) (edbInfo *models.EdbInfo, err error, errMsg string) {
|
|
|
var sourceEdbInfo *models.EdbInfo
|
|
|
|
|
|
{
|
|
@@ -104,8 +104,8 @@ func AddPredictEdbInfo(sourceEdbInfoId, classifyId int, edbName string, ruleList
|
|
|
UniqueCode: utils.MD5(utils.DATA_PREFIX + "_" + timestamp),
|
|
|
CreateTime: time.Now(),
|
|
|
ModifyTime: time.Now(),
|
|
|
- MinValue: sourceEdbInfo.MinValue,
|
|
|
- MaxValue: sourceEdbInfo.MaxValue,
|
|
|
+ MinValue: minValue,
|
|
|
+ MaxValue: maxValue,
|
|
|
CalculateFormula: sourceEdbInfo.CalculateFormula,
|
|
|
EdbType: 1,
|
|
|
|
|
@@ -382,7 +382,7 @@ func AddPredictEdbInfo(sourceEdbInfoId, classifyId int, edbName string, ruleList
|
|
|
}
|
|
|
|
|
|
|
|
|
-func EditPredictEdbInfo(edbInfoId, classifyId int, edbName string, ruleList []models.RuleConfig) (edbInfo *models.EdbInfo, err error, errMsg string) {
|
|
|
+func EditPredictEdbInfo(edbInfoId, classifyId int, edbName string, ruleList []models.RuleConfig, minValue, maxValue float64) (edbInfo *models.EdbInfo, err error, errMsg string) {
|
|
|
|
|
|
{
|
|
|
edbInfo, err = models.GetEdbInfoById(edbInfoId)
|
|
@@ -451,8 +451,10 @@ func EditPredictEdbInfo(edbInfoId, classifyId int, edbName string, ruleList []mo
|
|
|
edbInfo.EdbName = edbName
|
|
|
edbInfo.EdbNameSource = edbName
|
|
|
edbInfo.ClassifyId = classifyId
|
|
|
+ edbInfo.MinValue = minValue
|
|
|
+ edbInfo.MaxValue = maxValue
|
|
|
edbInfo.ModifyTime = time.Now()
|
|
|
- updateEdbInfoCol := []string{"EdbName", "EdbNameSource", "ClassifyId", "EndDate", "ModifyTime"}
|
|
|
+ updateEdbInfoCol := []string{"EdbName", "EdbNameSource", "ClassifyId", "EndDate", "MinValue", "MaxValue", "ModifyTime"}
|
|
|
|
|
|
var sourceEdbInfo *models.EdbInfo
|
|
|
|