forked from free-lancers/electricity_bill_calc_service
		
	fix(#22):修复部分字段读数问题
This commit is contained in:
		| @@ -257,14 +257,16 @@ func getReportSummary(c *fiber.Ctx) error { | ||||
| 		}, | ||||
| 		Area:                    report.OverallArea, | ||||
| 		BasicFee:                report.BasicFee, | ||||
| 		PooledBasicFeeByAmount:  report.AuthorizeLoss.Amount, | ||||
| 		PooledBasicFeeByAmount:  report.BasicPooledPriceConsumption.Decimal, | ||||
| 		PooledBasicFeeByArea:    report.BasicPooledPriceArea.Decimal, | ||||
| 		AdjustFee:               report.AdjustFee, | ||||
| 		PooledAdjustFeeByAmount: report.AdjustPooledPriceConsumption.Decimal, | ||||
| 		PooledAdjustFeeByArea:   report.AdjustPooledPriceArea.Decimal, | ||||
| 		Consumption:             report.ConsumptionFee.Decimal, | ||||
| 		Loss:                    report.Loss.Decimal, | ||||
| 		LossRate:                report.LossFee.Decimal, | ||||
| 		//Loss:                    report.Loss.Decimal, | ||||
| 		Loss: report.AuthorizeLoss.Amount, | ||||
| 		//LossRate:                report.LossFee.Decimal, | ||||
| 		LossRate: report.AuthorizeLoss.Proportion, | ||||
| 	} | ||||
| 	//copier.Copy(&summaryResponse, report) | ||||
| 	return result.Success( | ||||
|   | ||||
| @@ -307,7 +307,7 @@ func (rr _ReportRepository) RetrieveReportSummary(rid string) (*model.ReportSumm | ||||
| 		Select("*"). | ||||
| 		Where(goqu.I("report_id").Eq(rid)). | ||||
| 		Prepared(true).ToSQL() | ||||
|  | ||||
| 	log.Println(">>>>>>>>>>>>>>>.", querySql) | ||||
| 	var summary model.ReportSummary | ||||
| 	if err := pgxscan.Get(ctx, global.DB, &summary, querySql, queryParams...); err != nil { | ||||
| 		rr.log.Error("获取指定报表的总览信息时出现错误", zap.Error(err)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user