|
@@ -152,7 +152,6 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
|
|
|
calculateCellMap := make(map[string]Cell)
|
|
|
calculateChainList := make([]string, 0)
|
|
|
dateCalculateList := make([]string, 0)
|
|
|
- showStyleList := make([]string, 0)
|
|
|
|
|
|
for k, row := range config {
|
|
|
for i, cell := range row {
|
|
@@ -167,7 +166,6 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
|
|
|
case request.EdbDT:
|
|
|
if edbInfo, ok := edbInfoMap[cell.EdbInfoId]; ok {
|
|
|
cell.ShowValue = edbInfo.EdbName
|
|
|
- cell.RealValue = cell.ShowValue
|
|
|
}
|
|
|
case request.InsertDataDT, request.PopInsertDataDT:
|
|
|
|
|
@@ -208,7 +206,6 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
|
|
|
|
|
|
cellKeyVal[cell.Uid] = val
|
|
|
cell.ShowValue = utils.FormatTableDataShowValue(val)
|
|
|
- cell.RealValue = cell.ShowValue
|
|
|
}
|
|
|
} else {
|
|
|
|
|
@@ -240,7 +237,6 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
|
|
|
}
|
|
|
cellKeyVal[cell.Uid] = finalVal
|
|
|
cell.ShowValue = utils.FormatTableDataShowValue(dateValList[tmpLenData-1].Value)
|
|
|
- cell.RealValue = cell.ShowValue
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -262,7 +258,6 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
|
|
|
|
|
|
cellKeyVal[cell.Uid] = val
|
|
|
cell.ShowValue = utils.FormatTableDataShowValue(val)
|
|
|
- cell.RealValue = cell.ShowValue
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -391,7 +386,6 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
|
|
|
val := tmpDataMap[cellDateTime]
|
|
|
cellKeyVal[cell.Uid] = val
|
|
|
cell.ShowValue = utils.FormatTableDataShowValue(val)
|
|
|
- cell.RealValue = cell.ShowValue
|
|
|
case request.DateCalculateDataDT:
|
|
|
|
|
|
calculateCellMap[cell.Uid] = Cell{
|
|
@@ -403,14 +397,6 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
|
|
|
|
|
|
}
|
|
|
|
|
|
- if cell.ShowValue != `` {
|
|
|
- calculateCellMap[cell.Uid] = Cell{
|
|
|
- Column: k,
|
|
|
- Row: i,
|
|
|
- CellInfo: cell,
|
|
|
- }
|
|
|
- showStyleList = append(showStyleList, cell.Uid)
|
|
|
- }
|
|
|
row[i] = cell
|
|
|
}
|
|
|
config[k] = row
|
|
@@ -443,7 +429,6 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
|
|
|
|
|
|
cellKeyVal[cell.Uid] = val
|
|
|
cell.ShowValue = utils.FormatTableDataShowValue(val)
|
|
|
- cell.RealValue = cell.ShowValue
|
|
|
config[cellPosition.Column][cellPosition.Row] = cell
|
|
|
|
|
|
}
|
|
@@ -455,12 +440,6 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- config, err, errMsg = handleMixCellShowStyle(showStyleList, calculateCellMap, config)
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
newMixedTableCellDataList = config
|
|
|
|
|
|
return
|
|
@@ -724,13 +703,11 @@ func HandleMixTableDateChange(date, conf string) (newDate string, err error) {
|
|
|
return
|
|
|
}
|
|
|
for _, v := range edbDateConf.DateChange {
|
|
|
- if v.DateCalculate != nil {
|
|
|
- dateTime = dateTime.AddDate(v.DateCalculate.Year, v.DateCalculate.Month, v.DateCalculate.Day)
|
|
|
+ if v.ChangeType == 1 {
|
|
|
+ dateTime = dateTime.AddDate(v.Year, v.Month, v.Day)
|
|
|
newDate = dateTime.Format(utils.FormatDate)
|
|
|
- }
|
|
|
-
|
|
|
- if v.FrequencyChange != nil {
|
|
|
- newDate, err, _ = handleSystemAppointDateT(dateTime, v.FrequencyChange.FrequencyDay, v.FrequencyChange.Frequency)
|
|
|
+ } else if v.ChangeType == 2 {
|
|
|
+ newDate, err, _ = handleSystemAppointDateT(dateTime, v.FrequencyDay, v.Frequency)
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
@@ -775,8 +752,7 @@ func handleOldSystemDateT(confStr string) (newConf string, err error, errMsg str
|
|
|
|
|
|
newConfig := new(request.EdbDateConf)
|
|
|
dateChange := new(request.EdbDateConfDateChange)
|
|
|
- dateCalculate := new(request.EdbDateConfDateCalculate)
|
|
|
- frequencyChange := new(request.EdbDateConfFrequencyChange)
|
|
|
+
|
|
|
dateChangeList := make([]*request.EdbDateConfDateChange, 0)
|
|
|
|
|
|
switch config.Source {
|
|
@@ -784,8 +760,8 @@ func handleOldSystemDateT(confStr string) (newConf string, err error, errMsg str
|
|
|
return
|
|
|
case request.SystemCalculateDateT:
|
|
|
|
|
|
- dateCalculate.Day = config.CalculateNum
|
|
|
- dateChange.DateCalculate = dateCalculate
|
|
|
+ dateChange.Day = config.CalculateNum
|
|
|
+ dateChange.ChangeType = 1
|
|
|
dateChangeList = append(dateChangeList, dateChange)
|
|
|
newConfig.DateChange = dateChangeList
|
|
|
newConfByte, e := json.Marshal(newConfig)
|
|
@@ -796,10 +772,9 @@ func handleOldSystemDateT(confStr string) (newConf string, err error, errMsg str
|
|
|
newConf = string(newConfByte)
|
|
|
return
|
|
|
case request.SystemFrequencyDateT:
|
|
|
- frequencyChange.FrequencyDay = config.Day
|
|
|
- frequencyChange.Frequency = config.Frequency
|
|
|
-
|
|
|
- dateChange.FrequencyChange = frequencyChange
|
|
|
+ dateChange.FrequencyDay = config.Day
|
|
|
+ dateChange.Frequency = config.Frequency
|
|
|
+ dateChange.ChangeType = 1
|
|
|
dateChangeList = append(dateChangeList, dateChange)
|
|
|
newConfig.DateChange = dateChangeList
|
|
|
newConfByte, e := json.Marshal(newConfig)
|
|
@@ -1080,7 +1055,6 @@ func handlerDateCalculate(dateCalculateList []string, calculateCellMap map[strin
|
|
|
}
|
|
|
|
|
|
cell.ShowValue = utils.FormatTableDataShowValue(val)
|
|
|
- cell.RealValue = cell.ShowValue
|
|
|
config[cellPosition.Column][cellPosition.Row] = cell
|
|
|
}
|
|
|
}
|