作者 Your Name

更新查询

... ... @@ -156,8 +156,11 @@ func (productRecordService *ProductRecordService) ListProductCapacities(operateI
"transactionContext": transactionContext,
})
productBeginTime, _ := time.Parse("2006-01-02", param.ProductBeginTime)
productEndTime, _ := time.Parse("2006-01-02", param.ProductEndTime)
productBeginTime, _ := time.ParseInLocation("2006-01-02", param.ProductBeginTime, time.Local)
productEndTime, _ := time.ParseInLocation("2006-01-02", param.ProductEndTime, time.Local)
if !productEndTime.IsZero() {
productEndTime.Add((86400 - 1) * time.Second)
}
condition := map[string]interface{}{
"companyId": param.CompanyId,
"orgId": param.OrgId,
... ...
... ... @@ -500,21 +500,22 @@ func (srv ProductTroubleService) ListRewardSummary(param *query.ListRewardSummar
}
//搜索条件日期
if len(param.BeginDate) > 0 {
_, err = time.Parse("2006-01-02", param.BeginDate)
beginDate, err := time.ParseInLocation("2006-01-02", param.BeginDate, time.Local)
if err != nil {
return 0, nil, application.ThrowError(application.ARG_ERROR, "日期格式错误")
} else {
condition["beginDate"] = param.BeginDate
condition["beginDate"] = beginDate
}
}
//搜索条件日期
if len(param.EndDate) > 0 {
_, err = time.Parse("2006-01-02", param.EndDate)
endDate, err := time.ParseInLocation("2006-01-02", param.EndDate, time.Local)
if err != nil {
return 0, nil, application.ThrowError(application.ARG_ERROR, "日期格式错误")
} else {
condition["endDate"] = param.EndDate
endDate.Add((86400 - 1) * time.Second)
condition["endDate"] = endDate
}
}
... ...
... ... @@ -65,7 +65,7 @@ func (controller *ExcelDataController) FileImport() {
case "ImportAttendance":
data, err = excelService.ImportDataAttendance(cmd)
case "ImportProductCapacities":
data, err = excelService.ImportDataAttendance(cmd)
data, err = excelService.ImportProductCapacities(cmd)
default:
err = application.ThrowError(application.BUSINESS_ERROR, fmt.Sprintf("导入不存在 Code:%v", cmd.Code))
}
... ...