|
@@ -588,7 +588,7 @@ func GetBalanceExcelChartDetail(chartInfo *data_manage.ChartInfoView, mappingLis
|
|
|
endDate := chartInfo.EndDate
|
|
|
seasonStartDate := chartInfo.SeasonStartDate
|
|
|
seasonEndDate := chartInfo.SeasonEndDate
|
|
|
- //startYear := chartInfo.StartYear
|
|
|
+ startYear := chartInfo.StartYear
|
|
|
|
|
|
calendar := chartInfo.Calendar
|
|
|
|
|
@@ -678,14 +678,14 @@ func GetBalanceExcelChartDetail(chartInfo *data_manage.ChartInfoView, mappingLis
|
|
|
dateType = 3
|
|
|
}
|
|
|
}
|
|
|
- /*yearMax := 0
|
|
|
+ yearMax := 0
|
|
|
if dateType == utils.DateTypeNYears {
|
|
|
for _, v := range mappingList {
|
|
|
if v.LatestDate != "" {
|
|
|
lastDateT, tErr := time.Parse(utils.FormatDate, v.LatestDate)
|
|
|
if tErr != nil {
|
|
|
- br.Msg = "获取失败"
|
|
|
- br.ErrMsg = "获取图表日期信息失败,Err:" + tErr.Error()
|
|
|
+ errMsg = "获取失败"
|
|
|
+ err = fmt.Errorf("获取图表日期信息失败,Err:" + tErr.Error())
|
|
|
return
|
|
|
}
|
|
|
if lastDateT.Year() > yearMax {
|
|
@@ -694,7 +694,7 @@ func GetBalanceExcelChartDetail(chartInfo *data_manage.ChartInfoView, mappingLis
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- startDate, endDate = utils.GetDateByDateTypeV2(dateType, startDate, endDate, startYear, yearMax)*/
|
|
|
+ startDate, endDate = utils.GetDateByDateTypeV2(dateType, startDate, endDate, startYear, yearMax)
|
|
|
|
|
|
if chartInfo.ChartType == 2 {
|
|
|
chartInfo.StartDate = startDate
|
|
@@ -924,9 +924,10 @@ func GetBalanceExcelEdbDataMapList(chartInfoId, chartType int, calendar, startDa
|
|
|
//fmt.Println("line 1011 chart:", v.Source, v.EdbInfoId, startDateReal, endDate)
|
|
|
calendarPreYear := 0
|
|
|
if calendar == "农历" {
|
|
|
- newStartDateReal, err := time.Parse(utils.FormatDate, startDateReal)
|
|
|
- if err != nil {
|
|
|
- fmt.Println("time.Parse:" + err.Error())
|
|
|
+ newStartDateReal, e := time.Parse(utils.FormatDate, startDateReal)
|
|
|
+ if e != nil {
|
|
|
+ err = fmt.Errorf("时间解析 time.Parse(%s, %s) error: %v", utils.FormatDate, startDateReal, e)
|
|
|
+ return
|
|
|
}
|
|
|
calendarPreYear = newStartDateReal.Year() - 1
|
|
|
newStartDateReal = newStartDateReal.AddDate(-1, 0, 0)
|