|
@@ -34,10 +34,14 @@ func AddCalculatePhaseShift(req *EdbInfoCalculateBatchSaveReq, fromEdbInfo *EdbI
|
|
|
switch req.Frequency {
|
|
|
case "周度":
|
|
|
req.MoveFrequency = "周"
|
|
|
+ case "旬度":
|
|
|
+ req.MoveFrequency = "旬"
|
|
|
case "月度":
|
|
|
req.MoveFrequency = "月"
|
|
|
case "季度":
|
|
|
req.MoveFrequency = "季"
|
|
|
+ case "半年度":
|
|
|
+ req.MoveFrequency = "半年"
|
|
|
case "年度":
|
|
|
req.MoveFrequency = "年"
|
|
|
}
|
|
@@ -135,10 +139,14 @@ func EditCalculatePhaseShift(edbInfo *EdbInfo, req *EdbInfoCalculateBatchEditReq
|
|
|
switch req.Frequency {
|
|
|
case "周度":
|
|
|
req.MoveFrequency = "周"
|
|
|
+ case "旬度":
|
|
|
+ req.MoveFrequency = "旬"
|
|
|
case "月度":
|
|
|
req.MoveFrequency = "月"
|
|
|
case "季度":
|
|
|
req.MoveFrequency = "季"
|
|
|
+ case "半年度":
|
|
|
+ req.MoveFrequency = "半年"
|
|
|
case "年度":
|
|
|
req.MoveFrequency = "年"
|
|
|
}
|
|
@@ -368,10 +376,14 @@ func CalculateIntervalDays(moveFrequency string, formulaInt int, baseDate time.T
|
|
|
shiftDay = utils.CalculateTradingDays(baseDate, formulaInt, resultMap, moveType)
|
|
|
case "周":
|
|
|
shiftDay = formulaInt * 7
|
|
|
+ case "旬":
|
|
|
+ shiftDay = formulaInt * 10
|
|
|
case "月":
|
|
|
shiftDay = utils.CalculateEndOfMonth(baseDate, formulaInt)
|
|
|
case "季":
|
|
|
shiftDay = utils.CalculateEndOfQuarter(baseDate, formulaInt)
|
|
|
+ case "半年":
|
|
|
+ shiftDay = utils.CalculateEndOfHalfYear(baseDate, formulaInt)
|
|
|
case "年":
|
|
|
shiftDay = utils.CalculateEndOfYear(baseDate, formulaInt)
|
|
|
default:
|