作者 Your Name

更新查询

@@ -156,8 +156,11 @@ func (productRecordService *ProductRecordService) ListProductCapacities(operateI @@ -156,8 +156,11 @@ func (productRecordService *ProductRecordService) ListProductCapacities(operateI
156 "transactionContext": transactionContext, 156 "transactionContext": transactionContext,
157 }) 157 })
158 158
159 - productBeginTime, _ := time.Parse("2006-01-02", param.ProductBeginTime)  
160 - productEndTime, _ := time.Parse("2006-01-02", param.ProductEndTime) 159 + productBeginTime, _ := time.ParseInLocation("2006-01-02", param.ProductBeginTime, time.Local)
  160 + productEndTime, _ := time.ParseInLocation("2006-01-02", param.ProductEndTime, time.Local)
  161 + if !productEndTime.IsZero() {
  162 + productEndTime.Add((86400 - 1) * time.Second)
  163 + }
161 condition := map[string]interface{}{ 164 condition := map[string]interface{}{
162 "companyId": param.CompanyId, 165 "companyId": param.CompanyId,
163 "orgId": param.OrgId, 166 "orgId": param.OrgId,
@@ -500,21 +500,22 @@ func (srv ProductTroubleService) ListRewardSummary(param *query.ListRewardSummar @@ -500,21 +500,22 @@ func (srv ProductTroubleService) ListRewardSummary(param *query.ListRewardSummar
500 } 500 }
501 //搜索条件日期 501 //搜索条件日期
502 if len(param.BeginDate) > 0 { 502 if len(param.BeginDate) > 0 {
503 - _, err = time.Parse("2006-01-02", param.BeginDate) 503 + beginDate, err := time.ParseInLocation("2006-01-02", param.BeginDate, time.Local)
504 if err != nil { 504 if err != nil {
505 return 0, nil, application.ThrowError(application.ARG_ERROR, "日期格式错误") 505 return 0, nil, application.ThrowError(application.ARG_ERROR, "日期格式错误")
506 } else { 506 } else {
507 - condition["beginDate"] = param.BeginDate 507 + condition["beginDate"] = beginDate
508 } 508 }
509 509
510 } 510 }
511 //搜索条件日期 511 //搜索条件日期
512 if len(param.EndDate) > 0 { 512 if len(param.EndDate) > 0 {
513 - _, err = time.Parse("2006-01-02", param.EndDate) 513 + endDate, err := time.ParseInLocation("2006-01-02", param.EndDate, time.Local)
514 if err != nil { 514 if err != nil {
515 return 0, nil, application.ThrowError(application.ARG_ERROR, "日期格式错误") 515 return 0, nil, application.ThrowError(application.ARG_ERROR, "日期格式错误")
516 } else { 516 } else {
517 - condition["endDate"] = param.EndDate 517 + endDate.Add((86400 - 1) * time.Second)
  518 + condition["endDate"] = endDate
518 } 519 }
519 520
520 } 521 }
@@ -65,7 +65,7 @@ func (controller *ExcelDataController) FileImport() { @@ -65,7 +65,7 @@ func (controller *ExcelDataController) FileImport() {
65 case "ImportAttendance": 65 case "ImportAttendance":
66 data, err = excelService.ImportDataAttendance(cmd) 66 data, err = excelService.ImportDataAttendance(cmd)
67 case "ImportProductCapacities": 67 case "ImportProductCapacities":
68 - data, err = excelService.ImportDataAttendance(cmd) 68 + data, err = excelService.ImportProductCapacities(cmd)
69 default: 69 default:
70 err = application.ThrowError(application.BUSINESS_ERROR, fmt.Sprintf("导入不存在 Code:%v", cmd.Code)) 70 err = application.ThrowError(application.BUSINESS_ERROR, fmt.Sprintf("导入不存在 Code:%v", cmd.Code))
71 } 71 }