作者 陈志颖

fix:修复收支入参问题

... ... @@ -212,7 +212,7 @@ func (suMoneyService *SuMoneyService) ContributionsTransactionRecordStatistics(c
employeeDao = value
}
if calculateResult, err := employeeDao.CalculateSuMoneyTransactionRecord(contributionsTransactionRecordStatisticsCommand.Uid, contributionsTransactionRecordStatisticsCommand.TransactionStartTime, contributionsTransactionRecordStatisticsCommand.TransactionEndTime); err != nil {
if calculateResult, err := employeeDao.CalculateContributionsTransactionRecord(contributionsTransactionRecordStatisticsCommand.Uid, contributionsTransactionRecordStatisticsCommand.TransactionStartTime, contributionsTransactionRecordStatisticsCommand.TransactionEndTime); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
if err := transactionContext.CommitTransaction(); err != nil {
... ...
... ... @@ -261,7 +261,7 @@ func (dao *EmployeeDao) CalculateContributionsTransactionRecord(uid int64, trans
if err := tx.Model(suMoneyTransactionRecordModel).
ColumnExpr("sum(su_money_transaction_record.su_money) AS expend_su_money").
Where(`su_money_transaction_record.employee @> '{"uid":?}'`, uid).
Where(`su_money_transaction_record.record_type =`, 4).
Where(`su_money_transaction_record.record_type = ?`, 4).
Where(`su_money_transaction_record.create_time > ?`, transactionStartTime).
Where(`su_money_transaction_record.create_time < ?`, transactionEndTime).
Select(&expendContributions); err != nil {
... ...
... ... @@ -619,7 +619,6 @@ func (controller *SuMoneyController) ExportSuMoneyTransactionRecord() {
columnNum := 0 //列数
for _, vv := range v {
sheetPosition := cells[columnNum] + strconv.Itoa(lineNum+2)
//f.SetCellValue("Sheet1", sheetPosition, vv) // 所有字段保存为字符串类型
switch vv.(type) {
case string:
f.SetCellValue("Sheet1", sheetPosition, vv.(string))
... ... @@ -631,7 +630,7 @@ func (controller *SuMoneyController) ExportSuMoneyTransactionRecord() {
f.SetCellValue("Sheet1", sheetPosition, vv.(float64))
break
case time.Time:
f.SetCellValue("Sheet1", sheetPosition, vv.(time.Time))
f.SetCellValue("Sheet1", sheetPosition, vv)
break
}
columnNum++
... ...